summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-11-17 19:57:49 (GMT)
committerGitHub <noreply@github.com>2020-11-17 19:57:49 (GMT)
commit2a9eddf070f72060f62db1856a0af2e08729a46c (patch)
tree5901e8a404ad270efae1044c3bd74be10c70f263 /Modules/posixmodule.c
parente59958f8b6815f51f6c33b6a613cf8467ca18a11 (diff)
downloadcpython-2a9eddf070f72060f62db1856a0af2e08729a46c.zip
cpython-2a9eddf070f72060f62db1856a0af2e08729a46c.tar.gz
cpython-2a9eddf070f72060f62db1856a0af2e08729a46c.tar.bz2
bpo-41625: Add a guard for Linux for splice() constants in the os module (GH-23350)
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index ecab147..703309f 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -15142,7 +15142,7 @@ all_ins(PyObject *m)
#endif
/* constants for splice */
-#ifdef HAVE_SPLICE
+#if defined(HAVE_SPLICE) && defined(__linux__)
if (PyModule_AddIntConstant(m, "SPLICE_F_MOVE", SPLICE_F_MOVE)) return -1;
if (PyModule_AddIntConstant(m, "SPLICE_F_NONBLOCK", SPLICE_F_NONBLOCK)) return -1;
if (PyModule_AddIntConstant(m, "SPLICE_F_MORE", SPLICE_F_MORE)) return -1;