Re: [Plib-devel] net/ doesn't build on irix
Brought to you by:
sjbaker
From: <ma...@va...> - 2005-08-22 15:11:13
|
Bram Stolk wrote: >> >> >> The configure scripts tries to compile the following: >> >> #include <sys/types.h> >> #include <sys/socket.h> >> int accept (int, struct sockaddr *, socklen_t *); >> >> If it works, then socklen_t is supposed to be defined and nothing needs >> to be done (no -Dsocklen_t=int or similar). >> >> Maybe some other #include is needed for the code to work on IRIX? What >> does "man 2 accept" say? >> > > > $ man 2 accept > > NAME > accept - accept a connection on a socket > > SYNOPSIS > #include <sys/types.h> > #include <sys/socket.h> > > int accept (int s, struct sockaddr *addr, socklen_t *addrlen); > > #if _XOPEN_SOURCE >= 500 > int accept (int s, struct sockaddr *addr, socklen_t *addrlen); > #elif _XOPEN_SOURCE < 500 > int accept (int s, struct sockaddr *addr, size_t *addrlen); > #endif > > but in the logs: > > configure:6718: checking for socklen_t > configure:6740: cc -c -g -fullwarn conftest.c >&5 > cc-1143 cc: ERROR File = conftest.c, Line = 31 > Declaration is incompatible with "int accept(int, void *, socklen_t *)" > (declared at line 692 of "/usr/include/sys/socket.h"). > > int accept (int, struct sockaddr *, socklen_t *); > ^ > > 1 error detected in the compilation of "conftest.c". > > hmm.... why does irix use void ptr as arg? Strange. How about the following test instead: #include <sys/types.h> #include <sys/socket.h> socklen_t apa; ?? -marten |