From: Stephane Glondu Date: Wed, 24 Jul 2019 07:09:33 +0000 (+0200) Subject: Check for definition of AT_SECURE before using it X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~2^2~17^2~34 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=772ef739609dfd3efe2798c1e85ccef718e8e782;p=ocaml.git Check for definition of AT_SECURE before using it --- diff --git a/debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch b/debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch new file mode 100644 index 00000000..b71cb484 --- /dev/null +++ b/debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch @@ -0,0 +1,22 @@ +From: Stephane Glondu +Date: Wed, 24 Jul 2019 09:08:39 +0200 +Subject: Check for definition of AT_SECURE before using it + +This fixes compilation on kfreebsd-*. +--- + otherlibs/unix/envir.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/otherlibs/unix/envir.c b/otherlibs/unix/envir.c +index 3ad4b9c..bdc4193 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 diff --git a/debian/patches/series b/debian/patches/series index 7a628c63..45629306 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 0004-Put-manpages-in-section-3o-instead-of-3.patch 0003-Fix-in-configure.am.patch 0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch +0005-Check-for-definition-of-AT_SECURE-before-using-it.patch