--- /dev/null
+From: Stephane Glondu <steph@glondu.net>
+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
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