fix some win32 specific dependencies in poll.c
authorJoachim Schmitz <jojo@schmitz-digital.de>
Mon, 17 Sep 2012 21:18:27 +0000 (23:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2012 22:43:20 +0000 (15:43 -0700)
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>
compat/poll/poll.c

index 403eaa7a3c8c750d9be5934b197999c5057ce64d..49541f19cd1fa21de071ef0df214117bb4908d41 100644 (file)
@@ -24,7 +24,9 @@
 # pragma GCC diagnostic ignored "-Wtype-limits"
 #endif
 
-#include <malloc.h>
+#if defined(WIN32)
+# include <malloc.h>
+#endif
 
 #include <sys/types.h>
 
@@ -48,7 +50,9 @@
 #else
 # include <sys/time.h>
 # include <sys/socket.h>
-# include <sys/select.h>
+# ifndef NO_SYS_SELECT_H
+#  include <sys/select.h>
+# endif
 # include <unistd.h>
 #endif