]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41625: Add a guard for Linux for splice() constants in the os module (GH-23350)
authorPablo Galindo <Pablogsal@gmail.com>
Tue, 17 Nov 2020 19:57:49 +0000 (19:57 +0000)
committerGitHub <noreply@github.com>
Tue, 17 Nov 2020 19:57:49 +0000 (11:57 -0800)
Modules/posixmodule.c

index ecab147d2f38e7add76c78580a991bc493792eb4..703309f58687dac032a6d566fcdb4ca4a1410a58 100644 (file)
@@ -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;