summaryrefslogtreecommitdiffstats
path: root/daemon/guestfsd.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-11-25 14:53:17 +0000
committerRichard Jones <rjones@redhat.com>2009-11-25 16:28:26 +0000
commit33bc8fb6d25143ebba54f34c8ea6f5841a71f3e5 (patch)
tree4aae79302dbed740c311a11777b7bf3c4ad234ed /daemon/guestfsd.c
parent55355491c5ad2535b99a31ec81241f7f9f92177e (diff)
downloadlibguestfs-33bc8fb6d25143ebba54f34c8ea6f5841a71f3e5.tar.gz
libguestfs-33bc8fb6d25143ebba54f34c8ea6f5841a71f3e5.tar.xz
libguestfs-33bc8fb6d25143ebba54f34c8ea6f5841a71f3e5.zip
daemon/Win32: Replace setenv with Win32 equivalent.
Diffstat (limited to 'daemon/guestfsd.c')
-rw-r--r--daemon/guestfsd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index f31f1f21..64cf87fc 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -20,6 +20,10 @@
#define _BSD_SOURCE /* for daemon(3) */
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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