Hi,
 The current implementation doesn't have any support for windows,
meaning that environment variables will be unusable on that OS. The
attached patch makes secure_getenv() operate as getenv() on windows.

regards,
Nikos
From ec84aba19f2089d14445e12072bfc4aefbda54c7 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <n...@gnutls.org>
Date: Sat, 28 May 2016 19:48:51 +0200
Subject: [PATCH] secure_getenv: modified to operate as getenv() in windows

Signed-off-by: Nikos Mavrogiannopoulos <n...@gnutls.org>
---
 lib/secure_getenv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/secure_getenv.c b/lib/secure_getenv.c
index b6021d5..d35064b 100644
--- a/lib/secure_getenv.c
+++ b/lib/secure_getenv.c
@@ -24,7 +24,11 @@
 #  include <unistd.h>
 # else
 #  undef issetugid
-#  define issetugid() 1
+#  ifdef _WIN32
+#   define issetugid() 0
+#  else
+#   define issetugid() 1
+#  endif
 # endif
 #endif
 
-- 
2.8.0.rc3

Reply via email to