From 977be3e7b51359a3900984cead5a703c57009260 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sat, 1 Aug 2015 21:30:11 -0500 Subject: Issue #23652: Make the select module compile against LSB headers. Initial patch by Matt Frank. --- Misc/ACKS | 1 + Misc/NEWS | 4 ++++ Modules/selectmodule.c | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/Misc/ACKS b/Misc/ACKS index 9cfd8ec..21f4cca 100644 --- 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 diff --git a/Misc/NEWS b/Misc/NEWS index bc742a8..54c2d8c 100644 --- 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 diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 2707b05..6ea308a 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -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 -- cgit v0.12