mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Issue #27567: Expose the POLLRDHUP constant in the select module
This commit is contained in:
parent
a1ea9c813f
commit
fe8d966657
3 changed files with 13 additions and 1 deletions
|
@ -4,6 +4,10 @@
|
|||
have any value except INVALID_SOCKET.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_POLL_H) && !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include <structmember.h>
|
||||
|
||||
|
@ -2451,6 +2455,10 @@ PyInit_select(void)
|
|||
#endif
|
||||
#ifdef POLLMSG
|
||||
PyModule_AddIntMacro(m, POLLMSG);
|
||||
#endif
|
||||
#ifdef POLLRDHUP
|
||||
/* Kernel 2.6.17+ */
|
||||
PyModule_AddIntMacro(m, POLLRDHUP);
|
||||
#endif
|
||||
}
|
||||
#endif /* HAVE_POLL */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue