From 33bc8fb6d25143ebba54f34c8ea6f5841a71f3e5 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 25 Nov 2009 14:53:17 +0000 Subject: [PATCH] daemon/Win32: Replace setenv with Win32 equivalent. --- daemon/guestfsd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index f31f1f2..64cf87f 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -20,6 +20,10 @@ #define _BSD_SOURCE /* for daemon(3) */ +#ifdef HAVE_WINDOWS_H +#include +#endif + #include #include #include @@ -167,6 +171,9 @@ main (int argc, char *argv[]) perror ("sigaction SIGPIPE"); /* but try to continue anyway ... */ #endif +#ifdef WIN32 +#define setenv(n,v,f) _putenv(n "=" v) +#endif /* Set up a basic environment. After we are called by /init the * environment is essentially empty. * https://bugzilla.redhat.com/show_bug.cgi?id=502074#c5 -- 1.8.3.1