]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #23652: Make the select module compile against LSB headers.
authorZachary Ware <zachary.ware@gmail.com>
Sun, 2 Aug 2015 02:30:11 +0000 (21:30 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Sun, 2 Aug 2015 02:30:11 +0000 (21:30 -0500)
Initial patch by Matt Frank.

Misc/ACKS
Misc/NEWS
Modules/selectmodule.c

index 9cfd8ec7826aa54b369e14e3dda0365516a4dcb8..21f4cca1476c299deab1181bdfe6d687605a83b8 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -429,6 +429,7 @@ Doug Fort
 Chris Foster
 John Fouhy
 Andrew Francis
+Matt Frank
 Stefan Franke
 Martin Franklin
 Kent Frazier
index bc742a881d0d1bbcde64678a11147dcc0f7c8231..54c2d8cda649aa4a01330ca7eea90db624fdbcd8 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -34,6 +34,10 @@ Core and Builtins
 Library
 -------
 
+- Issue #23652: Make it possible to compile the select module against the
+  libc headers from the Linux Standard Base, which do not include some
+  EPOLL macros.  Initial patch by Matt Frank.
+
 - Issue #15138: Speed up base64.urlsafe_b64{en,de}code considerably.
 
 - Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch
index 2707b059f526b8fb9b7a4d398a495c454e0ae848..6ea308adb018ed2ead7378d7d8a711c1972e7943 100644 (file)
@@ -1874,11 +1874,21 @@ initselect(void)
     PyModule_AddIntConstant(m, "EPOLLONESHOT", EPOLLONESHOT);
 #endif
     /* PyModule_AddIntConstant(m, "EPOLL_RDHUP", EPOLLRDHUP); */
+#ifdef EPOLLRDNORM
     PyModule_AddIntConstant(m, "EPOLLRDNORM", EPOLLRDNORM);
+#endif
+#ifdef EPOLLRDBAND
     PyModule_AddIntConstant(m, "EPOLLRDBAND", EPOLLRDBAND);
+#endif
+#ifdef EPOLLWRNORM
     PyModule_AddIntConstant(m, "EPOLLWRNORM", EPOLLWRNORM);
+#endif
+#ifdef EPOLLWRBAND
     PyModule_AddIntConstant(m, "EPOLLWRBAND", EPOLLWRBAND);
+#endif
+#ifdef EPOLLMSG
     PyModule_AddIntConstant(m, "EPOLLMSG", EPOLLMSG);
+#endif
 #endif /* HAVE_EPOLL */
 
 #ifdef HAVE_KQUEUE