From cbc320ed79cd2624a3aa3e4424128000cbc3c84e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 25 Jan 2018 15:03:05 +0100 Subject: [PATCH] compat/poll: prepare for targeting Windows Vista Windows Vista (and later) actually have a working poll(), but we still cannot use it because it only works on sockets. So let's detect when we are targeting Windows Vista and undefine those constants, and define `pollfd` so that we can declare our own pollfd struct. We also need to make sure that we override those constants *after* `winsock2.h` has been `#include`d (otherwise we would not really override those constants). Signed-off-by: Johannes Schindelin --- compat/poll/poll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compat/poll/poll.c b/compat/poll/poll.c index 88f5c19c55c8e7..598da7342a41ed 100644 --- a/compat/poll/poll.c +++ b/compat/poll/poll.c @@ -29,9 +29,6 @@ #include -/* Specification. */ -#include - #include #include #include @@ -55,6 +52,9 @@ # include #endif +/* Specification. */ +#include "poll.h" + #ifdef HAVE_SYS_IOCTL_H # include #endif