Skip to content

Commit 98c573a

Browse files
Jojo-Schmitzgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6d45eb1 commit 98c573a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

compat/poll/poll.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
# pragma GCC diagnostic ignored "-Wtype-limits"
2525
#endif
2626

27-
#include <malloc.h>
27+
#if defined(WIN32)
28+
# include <malloc.h>
29+
#endif
2830

2931
#include <sys/types.h>
3032

@@ -48,7 +50,9 @@
4850
#else
4951
# include <sys/time.h>
5052
# include <sys/socket.h>
51-
# include <sys/select.h>
53+
# ifndef NO_SYS_SELECT_H
54+
# include <sys/select.h>
55+
# endif
5256
# include <unistd.h>
5357
#endif
5458

0 commit comments

Comments
 (0)