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.
This commit is contained in:
Nick Alcock 2019-06-04 15:04:49 +01:00
parent 6b22174ff1
commit ad118caa9f
5 changed files with 67 additions and 0 deletions

View file

@ -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))