diff options
Diffstat (limited to 'debian/patches/hurd-disable-nonworking-constants.diff')
-rw-r--r-- | debian/patches/hurd-disable-nonworking-constants.diff | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/hurd-disable-nonworking-constants.diff b/debian/patches/hurd-disable-nonworking-constants.diff new file mode 100644 index 0000000..d205bb8 --- /dev/null +++ b/debian/patches/hurd-disable-nonworking-constants.diff @@ -0,0 +1,38 @@ +# DP: Comment out constant exposed on the API which are not implemented on +# DP: GNU/Hurd. They would not work at runtime anyway. + +Index: b/Modules/socketmodule.c +=================================================================== +--- a/Modules/socketmodule.c ++++ b/Modules/socketmodule.c +@@ -6485,9 +6485,11 @@ PyInit__socket(void) + #ifdef SO_OOBINLINE + PyModule_AddIntMacro(m, SO_OOBINLINE); + #endif ++#ifndef __GNU__ + #ifdef SO_REUSEPORT + PyModule_AddIntMacro(m, SO_REUSEPORT); + #endif ++#endif + #ifdef SO_SNDBUF + PyModule_AddIntMacro(m, SO_SNDBUF); + #endif +Index: b/Modules/posixmodule.c +=================================================================== +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -12559,12 +12559,14 @@ all_ins(PyObject *m) + #ifdef O_LARGEFILE + if (PyModule_AddIntMacro(m, O_LARGEFILE)) return -1; + #endif ++#ifndef __GNU__ + #ifdef O_SHLOCK + if (PyModule_AddIntMacro(m, O_SHLOCK)) return -1; + #endif + #ifdef O_EXLOCK + if (PyModule_AddIntMacro(m, O_EXLOCK)) return -1; + #endif ++#endif + #ifdef O_EXEC + if (PyModule_AddIntMacro(m, O_EXEC)) return -1; + #endif |