fix some win32 specific dependencies in poll.c
In order for non-win32 platforms to be able to use poll.c, #ifdef the inclusion of two header files properly Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Joachim Schmitz committed
Sep 17, 2012 at 23:18 UTC
98c573a902d47722b062579c5a9d9e661b4263e4
1 file changed
+6
-2
compat/poll/poll.c
+6
-2
@@ -24,7 +24,9 @@
24
# pragma GCC diagnostic ignored "-Wtype-limits"
25
#endif
26
27
-#include <malloc.h>
27
+#if defined(WIN32)
28
+# include <malloc.h>
29
+#endif
30
31
#include <sys/types.h>
32
@@ -48,7 +50,9 @@
50
#else
51
# include <sys/time.h>
52
# include <sys/socket.h>
51
-# include <sys/select.h>
53
+# ifndef NO_SYS_SELECT_H
54
+# include <sys/select.h>
55
+# endif
56
# include <unistd.h>
57
#endif
58