From 07dd5a7e8691986d4ebe3d69256de3084fe92b11 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 30 Jun 2005 21:13:00 +0000 Subject: [PATCH] Attempt at a better fix for the winsock.h problems on Darwin. --- include/wine/test.h | 5 ++++- include/winsock.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/include/wine/test.h b/include/wine/test.h index a6232dc425a..279d5bda877 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -21,7 +21,10 @@ #ifndef __WINE_TEST_H #define __WINE_TEST_H -#include +#include +#include +#include +#include /* debug level */ extern int winetest_debug; diff --git a/include/winsock.h b/include/winsock.h index 65ddade65e2..2ce4754947a 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -56,6 +56,20 @@ # define FD_ISSET Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library # define fd_set Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library # define select Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library +# elif defined(RLIM_INFINITY) +/* On Darwin stdlib.h includes sys/resource.h which defines timeval but not the fd_set macros */ +# define fd_set unix_fd_set +# include +# include +# include +# undef fd_set +# undef FD_SETSIZE +# undef FD_CLR +# undef FD_SET +# undef FD_ZERO +# undef FD_ISSET +# define select Include_winsock_h_before_sys_types_h_or_use_the_MSVCRT_library +# define timeval Include_winsock_h_before_sys_types_h_or_use_the_MSVCRT_library # else /* FD_CLR */ /* stdlib.h has not been included yet so it's not too late. Include it now * making sure that none of the select symbols is affected. Then we can