Commit 80650dd91954e05c0b7a3c6432edf30485a0fe4d

Con Kolivas 2012-01-28T16:13:49

Define O_CLOEXEC for older headers that don't have it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/bitforce.c b/bitforce.c
index 790e000..b041aea 100644
--- a/bitforce.c
+++ b/bitforce.c
@@ -17,6 +17,9 @@
 #include <termios.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
 #else
 #include <windows.h>
 #include <io.h>