From: Michael Cronenworth Date: Tue, 11 Nov 2014 17:18:17 +0000 (-0600) Subject: compat: Add definition for setenv for Win32 X-Git-Tag: 0.23.1~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c2270eaaaf0e60e204cb81dd017bc89394f4f59;p=p11-kit compat: Add definition for setenv for Win32 Signed-off-by: Michael Cronenworth --- diff --git a/common/compat.h b/common/compat.h index 6483d4f..acbccf9 100644 --- a/common/compat.h +++ b/common/compat.h @@ -165,6 +165,10 @@ p11_mmap * p11_mmap_open (const char *path, void p11_mmap_close (p11_mmap *map); +#ifndef HAVE_SETENV +#define setenv(n, v, z) _putenv_s(n, v) +#endif /* HAVE_SETENV */ + #endif /* OS_WIN32 */ /* ---------------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 8a1939f..02ea526 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,7 @@ if test "$os_unix" = "yes"; then AC_CHECK_FUNCS([asprintf vasprintf vsnprintf]) AC_CHECK_FUNCS([timegm]) AC_CHECK_FUNCS([fdwalk]) + AC_CHECK_FUNCS([setenv]) AC_CHECK_DECLS([asprintf, vasprintf], [], [], [[#include ]])