Issue #23652: Make the select module compile against LSB headers.
Patch by Matt Frank.
diff --git a/Misc/NEWS b/Misc/NEWS
index 1aa2ea3..f3348c1 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,10 @@
 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.
 
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index ffaf865..d436f52 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -2372,11 +2372,22 @@
     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);