Make test/pipe.c compiles on Darwin 8.0

Pierre d'Herbemont stegefin at free.fr
Tue May 17 05:53:24 CDT 2005


Alexandre,

This patch fixes, on Darwin 8.0 (I am not sure if this problem is due 
to the new version), this error:

gcc -c -I. -I. -I../../../include -I../../../include    -D_REENTRANT 
-fPIC -Wall -pipe -fno-strict-aliasing -gstabs+ -Wpointer-arith  -g -O2 
-ffixed-r13 -no-cpp-precomp -D__powerpc__ -o pipe.o pipe.c
In file included from ../../../include/winsock2.h:47,
                  from ../../../include/windows.h:63,
                  from ../../../include/winsock.h:91,
                  from pipe.c:29:
../../../include/winsock.h:414: error: redefinition of `struct timeval'
make[3]: *** [pipe.o] Error 1
make[2]: *** [tests] Error 2
make[1]: *** [kernel] Error 2
make: *** [dlls] Error 2

I simply swapped the stdlib inclusion in tests/pipe.c, but I am not 
sure it is the way to go.

Thanks,

Pierre.

ChangeLog:
Include winsock.h before stdlib.h

-------------- next part --------------
Index: dlls/kernel/tests/pipe.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/tests/pipe.c,v
retrieving revision 1.17
diff -u -r1.17 pipe.c
--- dlls/kernel/tests/pipe.c	24 Mar 2005 19:05:02 -0000	1.17
+++ dlls/kernel/tests/pipe.c	17 May 2005 10:47:16 -0000
@@ -20,7 +20,6 @@
 
 #include <assert.h>
 #include <stdarg.h>
-#include <stdlib.h>
 #include <stdio.h>
 #include <time.h>
 
@@ -28,6 +27,10 @@
 #include <winbase.h>
 #include <winsock.h>
 
+/* After winsock */
+#include <stdlib.h>
+
+
 #ifndef STANDALONE
 #include "wine/test.h"
 #else


More information about the wine-patches mailing list