]> 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:34:05 +0000 (21:34 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Sun, 2 Aug 2015 02:34:05 +0000 (21:34 -0500)
Patch by Matt Frank.

Misc/NEWS
Modules/selectmodule.c

index 1aa2ea3e96cdb702892180d87d555a8e086c96f7..f3348c14b10289bd07fa4435fc4598b4a598439c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,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.  Patch by Matt Frank.
+
 - Issue #22932: Fix timezones in email.utils.formatdate.
   Patch from Dmitry Shachnev.
 
index ffaf865df2b750061edc94d85d7fb0e356e52dfc..d436f52917d68a82ef5d99aea495164aea1adc55 100644 (file)
@@ -2372,11 +2372,22 @@ PyInit_select(void)
     PyModule_AddIntMacro(m, EPOLLONESHOT);
 #endif
     /* PyModule_AddIntConstant(m, "EPOLL_RDHUP", EPOLLRDHUP); */
+
+#ifdef EPOLLRDNORM
     PyModule_AddIntMacro(m, EPOLLRDNORM);
+#endif
+#ifdef EPOLLRDBAND
     PyModule_AddIntMacro(m, EPOLLRDBAND);
+#endif
+#ifdef EPOLLWRNORM
     PyModule_AddIntMacro(m, EPOLLWRNORM);
+#endif
+#ifdef EPOLLWRBAND
     PyModule_AddIntMacro(m, EPOLLWRBAND);
+#endif
+#ifdef EPOLLMSG
     PyModule_AddIntMacro(m, EPOLLMSG);
+#endif
 
 #ifdef EPOLL_CLOEXEC
     PyModule_AddIntMacro(m, EPOLL_CLOEXEC);