[PATCH 3/4] os: Fix build of xserver_poll.c on MinGW

Jon Turney jon.turney at dronecode.org.uk
Thu Jul 28 19:20:25 UTC 2016


Include winsock.h for definition of fd_set type and select()

Future work: Maybe this also needs some error checking for fd > FD_SETSIZE?

Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
---
 os/xserver_poll.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/os/xserver_poll.c b/os/xserver_poll.c
index f152cda..1927dfa 100644
--- a/os/xserver_poll.c
+++ b/os/xserver_poll.c
@@ -84,6 +84,10 @@
 #include <string.h>                          /* string functions */
 #include "xserver_poll.h"
 
+#if defined(WIN32) && !defined(__CYGWIN__)
+#include <X11/Xwinsock.h>
+#endif
+
 /*---------------------------------------------------------------------------*\
 				  Macros
 \*---------------------------------------------------------------------------*/
-- 
2.8.3



More information about the xorg-devel mailing list