diff --git a/src/internal.h b/src/internal.h index 4a63984cecd484a095850a55d16dfcdf5dd4cc81..8c9322ec1e2e84a9971afb984a5b5cf0ab241cf5 100644 --- a/src/internal.h +++ b/src/internal.h @@ -89,6 +89,12 @@ #define NUL_TERMINATE(buf) do { (buf)[sizeof(buf)-1] = '\0'; } while (0) +#ifdef WIN32 +# ifndef O_CLOEXEC +# define O_CLOEXEC _O_NOINHERIT +# endif +#endif + /** * G_GNUC_NO_INLINE: *