include/wine/port.h and socklen_t breakage

Gerald Pfeifer pfeifer at dbai.tuwien.ac.at
Wed Sep 15 02:53:39 CDT 2004


The following change to include/wine/port.h

   revision 1.58
   date: 2004/09/03 18:30:28;  author: julliard;  state: Exp;  lines: +3 -0
   Added configure check for socklen_t.

   +#ifndef HAVE_SOCKLEN_T
   +typedef unsigned int socklen_t;
   +#endif

causes the following build failure on an old version of FreeBSD 5.1, and
probably other systems as well.

   gmake[1]: Entering directory `/home/gerald/wine/loader'
   /usr/bin/gcc -c -I. -I. -I../include -I../include    -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -g -O2 -o kthread.o kthread.c
   In file included from kthread.c:41:
   /usr/include/sys/socket.h:77: error: redefinition of `socklen_t'
   ../include/wine/port.h:65: error: `socklen_t' previously declared here
   gmake[1]: *** [kthread.o] Error 1

The issue here is that socklen_t is defined in /usr/include/sys/socket.h,
but ac_include_default in the configure script does not contain this dir.

Which means that HAVE_SOCKLEN_T will be undefined, but once you include
/usr/include/sys/socket.h, you'll get the conflict with our port.h.

Gerald



More information about the wine-devel mailing list