aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ndctl/0001-util-Enable-ndctl-to-compile-on-non-glibc-envs.patch
diff options
context:
space:
mode:
authorBreno Leitao <breno.leitao@gmail.com>2017-03-11 23:10:38 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-03-12 05:21:26 +0000
commitaebf2df2a6a56187dfcd958b4bae825eaae4c958 (patch)
tree6ed5dad7da87a30073e3a2f60c9bd4630347e333 /testing/ndctl/0001-util-Enable-ndctl-to-compile-on-non-glibc-envs.patch
parent35e4b129695d6527c6c90e7f99fec6233568639f (diff)
testing/ndctl: new aport
ndctl is a utility for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel. Adding it into Alpine Linux.
Diffstat (limited to 'testing/ndctl/0001-util-Enable-ndctl-to-compile-on-non-glibc-envs.patch')
-rw-r--r--testing/ndctl/0001-util-Enable-ndctl-to-compile-on-non-glibc-envs.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/ndctl/0001-util-Enable-ndctl-to-compile-on-non-glibc-envs.patch b/testing/ndctl/0001-util-Enable-ndctl-to-compile-on-non-glibc-envs.patch
new file mode 100644
index 00000000000..91def43fe41
--- /dev/null
+++ b/testing/ndctl/0001-util-Enable-ndctl-to-compile-on-non-glibc-envs.patch
@@ -0,0 +1,36 @@
+From da1d1cbbffe90aefe1579d2708bae43753c5afb4 Mon Sep 17 00:00:00 2001
+From: Breno Leitao <breno.leitao@gmail.com>
+Date: Sat, 11 Mar 2017 22:33:43 +0000
+Subject: [PATCH] util: Enable ndctl to compile on non-glibc envs
+
+Currently ndctl does not build on non-glibc environments, as musl.
+
+It fails because neither functions secure_getenv() nor
+_secure_getenv() are available. These functions are only available
+on systems with glibc version 2.17 or later.
+
+This patch just make a fallback to getenv() if the secure functions
+are missing.
+
+Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
+---
+ util/log.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/util/log.h b/util/log.h
+index 5c5922f..5fc56e8 100644
+--- a/util/log.h
++++ b/util/log.h
+@@ -62,7 +62,8 @@ do { \
+ # ifdef HAVE___SECURE_GETENV
+ # define secure_getenv __secure_getenv
+ # else
+-# error neither secure_getenv nor __secure_getenv is available
++# warning neither secure_getenv nor __secure_getenv is available.
++# define secure_getenv getenv
+ # endif
+ #endif
+
+--
+2.11.1
+