GNU bug report logs - #35430
MinGW: Including libguile.h breaks build because there is no sys/select.h

Previous Next

Package: guile;

Reported by: John Ralls <jralls <at> ceridwen.us>

Date: Thu, 25 Apr 2019 20:03:02 UTC

Severity: normal

Full log


Message #8 received at 35430 <at> debbugs.gnu.org (full text, mbox):

From: John Ralls <jralls <at> ceridwen.us>
To: 35430 <at> debbugs.gnu.org
Subject: Patch for 35430
Date: Thu, 25 Apr 2019 13:59:39 -0700
From 843070dd3961a2282ee9f6582f459e70894758fa Mon Sep 17 00:00:00 2001
From: John Ralls <jralls <at> ceridwen.us>
Date: Thu, 25 Apr 2019 13:49:02 -0700
Subject: [PATCH] MinGW: Don't break build when including libguile.h

     * iselect.h: get fd_set declaration from winsock2.h on MinGW.
Fixes bug 35430.
---
 libguile/iselect.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libguile/iselect.h b/libguile/iselect.h
index 945ad14af..806c30504 100644
--- a/libguile/iselect.h
+++ b/libguile/iselect.h
@@ -29,7 +29,11 @@
 /* Needed for FD_SET on some systems.  */
 #include <sys/types.h>

+#ifdef __MINGW32__
+#include <winsock2.h>
+#else
 #include <sys/select.h>
+#endif

 SCM_API int scm_std_select (int fds,
                            fd_set *rfds,
@@ -38,7 +42,6 @@ SCM_API int scm_std_select (int fds,
                            struct timeval *timeout);

 #define SELECT_TYPE fd_set
-
 #endif  /* SCM_ISELECT_H */

 /*
--
2.20.1





This bug report was last modified 2 years and 266 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.