Advertisement
Guest User

Untitled

a guest
Mar 31st, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. diff --git a/sha1_stubs.c b/sha1_stubs.c
  2. index 4d48ef9..782c10f 100644
  3. --- a/sha1_stubs.c
  4. +++ b/sha1_stubs.c
  5. @@ -36,7 +36,7 @@ static inline int sha1_file(char *filename, sha1_digest *digest)
  6. int fd; ssize_t n;
  7. struct sha1_ctx ctx;
  8.  
  9. -#ifdef WIN32
  10. +#ifndef O_CLOEXEC
  11. fd = open(filename, O_RDONLY);
  12. #else
  13. fd = open(filename, O_RDONLY | O_CLOEXEC);
  14. diff --git a/sha256_stubs.c b/sha256_stubs.c
  15. index f0b6411..ae75c6a 100644
  16. --- a/sha256_stubs.c
  17. +++ b/sha256_stubs.c
  18. @@ -36,7 +36,7 @@ static inline int sha256_file(char *filename, sha256_digest *digest)
  19. int fd; ssize_t n;
  20. struct sha256_ctx ctx;
  21.  
  22. -#ifdef WIN32
  23. +#ifndef O_CLOEXEC
  24. fd = open(filename, O_RDONLY);
  25. #else
  26. fd = open(filename, O_RDONLY | O_CLOEXEC);
  27. diff --git a/sha512_stubs.c b/sha512_stubs.c
  28. index 2652e19..c966ffc 100644
  29. --- a/sha512_stubs.c
  30. +++ b/sha512_stubs.c
  31. @@ -36,7 +36,7 @@ static inline int sha512_file(char *filename, sha512_digest *digest)
  32. int fd; ssize_t n;
  33. struct sha512_ctx ctx;
  34.  
  35. -#ifdef WIN32
  36. +#ifndef O_CLOEXEC
  37. fd = open(filename, O_RDONLY);
  38. #else
  39. fd = open(filename, O_RDONLY | O_CLOEXEC);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement