Problem in Building socket code from Stevens book
We obtained code ffor Unix Network Programming Vol I second edition
From the site kohala.com/start/unpv12e.html
While compiling code in the directory unpv12e/libroute we faced the error
[root@web-server libroute]# make
gcc -g -O2 -D_REENTRANT -Wall -c -o get_rtaddrs.o get_rtaddrs.c
get_rtaddrs.c: In function `get_rtaddrs':
get_rtaddrs.c:32: error: structure has no member named `sa_len'
get_rtaddrs.c:32: error: structure has no member named `sa_len'
get_rtaddrs.c:32: error: structure has no member named `sa_len'
get_rtaddrs.c:32: error: structure has no member named `sa_len'
make: *** [get_rtaddrs.o] Error 1
[root@web-server libroute]#
we looked up the structure "sockaddr" in sys/socket.h but sockaddr was not found but there was a structure "osockaddr" which did not contain sa_len
Please suggest some solutions
Note:- My system is LInux FC2 while the code I obtained is for the older version
If anyone has the port of these programs for FC2 please give us the link
|