summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c2
-rw-r--r--Modules/socketmodule.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index ecdeab4925..7d8249095d 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -12658,12 +12658,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
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index dc57810a07..6355e4a59a 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -6529,9 +6529,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