diff options
author | Stéphane Glondu <steph@glondu.net> | 2019-10-11 14:28:23 +0200 |
---|---|---|
committer | Damien Doligez <damien.doligez@inria.fr> | 2019-10-11 14:28:23 +0200 |
commit | 0dace4321658fb16f1ebbdadbae56b549ca90198 (patch) | |
tree | 82d30c3801a7ef56770ab51aa3e7d9440701e069 | |
parent | 8b6e1e3c00c2caeb0f211056aa7cc2929b3f32ca (diff) | |
download | ocaml-0dace4321658fb16f1ebbdadbae56b549ca90198.tar.gz |
Check for definition of AT_SECURE before using it (#8842)
Check for definition of AT_SECURE before using it
This fixes compilation on kfreebsd.
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | otherlibs/unix/envir.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -33,6 +33,9 @@ OCaml 4.08.1 (5 August 2019) - #8843, #8841: fix use of off_t on 32-bit systems. (Stephen Dolan, report by Richard Jones, review by Xavier Leroy) +- #8842: check for definition of AT_SECURE before using it + (Stéphane Glondu, review by David Allsopp) + OCaml 4.08.0 (13 June 2019) --------------------------- diff --git a/otherlibs/unix/envir.c b/otherlibs/unix/envir.c index 3ad4b9caa0..bdc41939bc 100644 --- a/otherlibs/unix/envir.c +++ b/otherlibs/unix/envir.c @@ -39,7 +39,7 @@ CAMLprim value unix_environment_unsafe(value unit) static char **secure_environ(void) { -#ifdef HAS_GETAUXVAL +#if defined(HAS_GETAUXVAL) && defined(AT_SECURE) if (!getauxval(AT_SECURE)) return environ; else |