blob: 33f25b6a6b2cbe18299751c84a5bb2489029118a [file] [log] [blame]
Brad Bishop63ae8782019-10-09 09:56:13 -04001From 7d0732d69a774e28bc46b8b487d9f61bdd8afbff Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 6 Oct 2019 18:15:44 -0700
4Subject: [PATCH] os_posix: Use __FreeBSD__ to control secure_getenv definition
5
6__USE_GNU does not cover all Linux platforms, e.g. when using musl as C
7library, __USE_GNU may not be defined but it does provide secure_getenv
8so instead of narrowing the else condition, lets speicifically check for
9FreeBSD being the platform, since that seems to be the intention here
10anyway
11
12Upstream-Status: Submitted [https://github.com/pmem/pmdk/pull/3999]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/common/os_posix.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/common/os_posix.c b/src/common/os_posix.c
19index a9a37ef84..052db2383 100644
20--- a/src/common/os_posix.c
21+++ b/src/common/os_posix.c
22@@ -346,7 +346,7 @@ os_setenv(const char *name, const char *value, int overwrite)
23 /*
24 * secure_getenv -- provide GNU secure_getenv for FreeBSD
25 */
26-#ifndef __USE_GNU
27+#if defined(__FreeBSD__)
28 static char *
29 secure_getenv(const char *name)
30 {
31--
322.23.0
33