PATCH: dlls/winsock/socket.h portability fix
Gerald Pfeifer
gerald at pfeifer.com
Thu Nov 17 16:22:14 CST 2005
After the recent changes to dlls/winsock/socket.h, I'm getting the
following build failure on FreeBSD 5.3:
/usr/bin/gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__
-DUSE_WS_PREFIX -D_REENTRANT -fPIC -Wall -pipe
-mpreferred-stack-boundary=2 -fno-strict- aliasing -gstabs+
-Wdeclaration-after-statement -Wpointer-arith -g -O2 -o socket.o socket.c
socket.c:335: error: `EAI_NODATA' undeclared here (not in a function)
socket.c:335: error: initializer element is not constant socket.c:335:
error: (near initialization for `ws_eai_map[5][1]')
The following patch fixes this.
Gerald
ChangeLog:
On some systems like FreeBSD, EAI_NODATA is defined in <lwres/netdb.h>,
so include this if present.
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.414
diff -u -3 -p -r1.414 configure.ac
--- configure.ac 17 Nov 2005 12:58:35 -0000 1.414
+++ configure.ac 17 Nov 2005 22:19:29 -0000
@@ -208,6 +208,7 @@ AC_CHECK_HEADERS(\
linux/param.h \
linux/serial.h \
linux/ucdrom.h \
+ lwres/netdb.h \
mach/machine.h \
machine/cpu.h \
machine/limits.h \
Index: dlls/winsock/socket.c
===================================================================
RCS file: /home/wine/wine/dlls/winsock/socket.c,v
retrieving revision 1.195
diff -u -3 -p -r1.195 socket.c
--- dlls/winsock/socket.c 17 Nov 2005 12:58:35 -0000 1.195
+++ dlls/winsock/socket.c 17 Nov 2005 22:19:48 -0000
@@ -64,6 +64,9 @@
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#ifdef HAVE_LWRES_NETDB_H
+# include <lwres/netdb.h>
+#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
More information about the wine-patches
mailing list