From 1c72737fb53c16a15d8c68472bfd32ee5365b818 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Wed, 24 Jul 2019 09:08:39 +0200 Subject: [PATCH] Check for definition of AT_SECURE before using it This fixes compilation on kfreebsd-*. Forwarded: https://github.com/ocaml/ocaml/pull/8842 Gbp-Pq: Name 0005-Check-for-definition-of-AT_SECURE-before-using-it.patch --- otherlibs/unix/envir_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otherlibs/unix/envir_unix.c b/otherlibs/unix/envir_unix.c index cef6cb0a..977db1c3 100644 --- a/otherlibs/unix/envir_unix.c +++ b/otherlibs/unix/envir_unix.c @@ -39,7 +39,7 @@ CAMLprim value caml_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 -- 2.30.2