From 772ef739609dfd3efe2798c1e85ccef718e8e782 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Wed, 24 Jul 2019 09:09:33 +0200 Subject: [PATCH] Check for definition of AT_SECURE before using it --- ...inition-of-AT_SECURE-before-using-it.patch | 22 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 23 insertions(+) create mode 100644 debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch 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 -- 2.30.2