aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-decls.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-06-04 15:04:49 +0100
committerNick Alcock <nick.alcock@oracle.com>2019-06-04 17:05:08 +0100
commitad118caa9f690114d11384b0813f30980cc333f3 (patch)
tree3261c7175a31eb17ae72c2a8f0d107c4d1ad9f59 /libctf/ctf-decls.h
parent6b22174ff163b828a2069f22353018ca97fc0fb4 (diff)
downloadbinutils-ad118caa9f690114d11384b0813f30980cc333f3.zip
binutils-ad118caa9f690114d11384b0813f30980cc333f3.tar.gz
binutils-ad118caa9f690114d11384b0813f30980cc333f3.tar.bz2
libctf: work on platforms without O_CLOEXEC.
(Not tested on any such platforms, since I don't have access to any at the moment. Testing encouraged.) libctf/ * configure.ac: Check for O_CLOEXEC. * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be. * config.h.in: Regenerate.
Diffstat (limited to 'libctf/ctf-decls.h')
-rw-r--r--libctf/ctf-decls.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libctf/ctf-decls.h b/libctf/ctf-decls.h
index d12409e..c840b79 100644
--- a/libctf/ctf-decls.h
+++ b/libctf/ctf-decls.h
@@ -62,6 +62,10 @@ void ctf_qsort_r (void *base, size_t nmemb, size_t size,
void *arg);
#endif
+#ifndef HAVE_O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
#undef MAX
#undef MIN
#define MAX(a, b) ((a) > (b) ? (a) : (b))