From ecc02cfb5ab08326db6c2ee056546796246a49ce Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 24 Oct 2020 14:05:24 +0530 Subject: [PATCH] No O_CLOEXEC on windows --- src/calibre/utils/speedup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/utils/speedup.c b/src/calibre/utils/speedup.c index c0f018ad17..400c1f7a4a 100644 --- a/src/calibre/utils/speedup.c +++ b/src/calibre/utils/speedup.c @@ -580,7 +580,9 @@ static PyMethodDef speedup_methods[] = { static int exec_module(PyObject *module) { PyDateTime_IMPORT; +#ifndef _WIN32 PyModule_AddIntConstant(module, "O_CLOEXEC", O_CLOEXEC); +#endif return 0; }