[Libguestfs] [PATCH] daemon/Windows: Define _WIN32_WINNT when compiling on Windows.

Richard W.M. Jones rjones at redhat.com
Wed Nov 25 11:42:47 UTC 2009


-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
-------------- next part --------------
>From 4e031cd778dbd30074247c93b8a07af4ab1b933f Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at redhat.com>
Date: Wed, 25 Nov 2009 11:38:44 +0000
Subject: [PATCH 1/4] daemon/Windows: Define _WIN32_WINNT when compiling on Windows.

---
 daemon/configure.ac |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/daemon/configure.ac b/daemon/configure.ac
index c6d9d98..54d2a4c 100644
--- a/daemon/configure.ac
+++ b/daemon/configure.ac
@@ -124,6 +124,12 @@ test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
 
 AM_PROG_CC_C_O
 
+dnl If the host is Windows, define _WIN32_WINNT to a suitable value.
+AC_CANONICAL_HOST
+case $host in
+     *mingw*|*cygwin*|*win32*) CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0500" ;;
+esac
+
 dnl Check support for 64 bit file offsets.
 AC_SYS_LARGEFILE
 
-- 
1.6.5.2



More information about the Libguestfs mailing list