diff --git a/sha1_stubs.c b/sha1_stubs.c index 4d48ef9..782c10f 100644 --- a/sha1_stubs.c +++ b/sha1_stubs.c @@ -36,7 +36,7 @@ static inline int sha1_file(char *filename, sha1_digest *digest) int fd; ssize_t n; struct sha1_ctx ctx; -#ifdef WIN32 +#ifndef O_CLOEXEC fd = open(filename, O_RDONLY); #else fd = open(filename, O_RDONLY | O_CLOEXEC); diff --git a/sha256_stubs.c b/sha256_stubs.c index f0b6411..ae75c6a 100644 --- a/sha256_stubs.c +++ b/sha256_stubs.c @@ -36,7 +36,7 @@ static inline int sha256_file(char *filename, sha256_digest *digest) int fd; ssize_t n; struct sha256_ctx ctx; -#ifdef WIN32 +#ifndef O_CLOEXEC fd = open(filename, O_RDONLY); #else fd = open(filename, O_RDONLY | O_CLOEXEC); diff --git a/sha512_stubs.c b/sha512_stubs.c index 2652e19..c966ffc 100644 --- a/sha512_stubs.c +++ b/sha512_stubs.c @@ -36,7 +36,7 @@ static inline int sha512_file(char *filename, sha512_digest *digest) int fd; ssize_t n; struct sha512_ctx ctx; -#ifdef WIN32 +#ifndef O_CLOEXEC fd = open(filename, O_RDONLY); #else fd = open(filename, O_RDONLY | O_CLOEXEC);