From: Pablo Galindo Date: Tue, 17 Nov 2020 19:57:49 +0000 (+0000) Subject: bpo-41625: Add a guard for Linux for splice() constants in the os module (GH-23350) X-Git-Tag: v3.10.0a3~174 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2a9eddf070f72060f62db1856a0af2e08729a46c;p=thirdparty%2FPython%2Fcpython.git bpo-41625: Add a guard for Linux for splice() constants in the os module (GH-23350) --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index ecab147d2f38..703309f58687 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;