summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2021-12-08 22:28:51 (GMT)
committerGitHub <noreply@github.com>2021-12-08 22:28:51 (GMT)
commit267539bff700c2493778c07eeb1642b9584c4826 (patch)
tree7a49e35fa40ee5b332c2cd5abaabf0bd4328db1a /Modules
parent2109f7880b65755329a877da3a7f8a362de07350 (diff)
downloadcpython-267539bff700c2493778c07eeb1642b9584c4826.zip
cpython-267539bff700c2493778c07eeb1642b9584c4826.tar.gz
cpython-267539bff700c2493778c07eeb1642b9584c4826.tar.bz2
bpo-46016: fcntl module add FreeBSD's F_DUP2FD_CLOEXEC flag support (GH-29993)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/fcntlmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index cdf0f9b..ea9b2bc 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -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;