bpo-46016: fcntl module add FreeBSD's F_DUP2FD_CLOEXEC flag support (GH-29993)

This commit is contained in:
David CARLIER 2021-12-08 22:28:51 +00:00 committed by GitHub
parent 2109f7880b
commit 267539bff7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 0 deletions

View file

@ -581,6 +581,14 @@ all_ins(PyObject* m)
if (PyModule_AddIntMacro(m, F_NOCACHE)) return -1;
#endif
/* FreeBSD specifics */
#ifdef F_DUP2FD
if (PyModule_AddIntMacro(m, F_DUP2FD)) return -1;
#endif
#ifdef F_DUP2FD_CLOEXEC
if (PyModule_AddIntMacro(m, F_DUP2FD_CLOEXEC)) return -1;
#endif
/* For F_{GET|SET}FL */
#ifdef FD_CLOEXEC
if (PyModule_AddIntMacro(m, FD_CLOEXEC)) return -1;