From: Richard Jones Date: Wed, 25 Nov 2009 14:53:17 +0000 (+0000) Subject: daemon/Win32: Replace setenv with Win32 equivalent. X-Git-Tag: 1.0.80~42 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=33bc8fb6d25143ebba54f34c8ea6f5841a71f3e5;p=libguestfs.git daemon/Win32: Replace setenv with Win32 equivalent. --- 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