Check for definition of AT_SECURE before using it
authorStephane Glondu <steph@glondu.net>
Wed, 24 Jul 2019 07:08:39 +0000 (09:08 +0200)
committerStéphane Glondu <glondu@debian.org>
Wed, 19 Jan 2022 10:14:42 +0000 (11:14 +0100)
This fixes compilation on kfreebsd-*.

Forwarded: https://github.com/ocaml/ocaml/pull/8842

Gbp-Pq: Name 0003-Check-for-definition-of-AT_SECURE-before-using-it.patch

otherlibs/unix/envir.c

index 3ad4b9caa0206e42a042408449a6687890303f7e..bdc41939bc2874b834cd202aa7c7876f5e594de0 100644 (file)
@@ -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