bpo-41625: Add a guard for Linux for splice() constants in the os module (GH-23350)

This commit is contained in:
Pablo Galindo 2020-11-17 19:57:49 +00:00 committed by GitHub
parent e59958f8b6
commit 2a9eddf070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View 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;