Richard W.M. Jones
2009-Nov-25 11:42 UTC
[Libguestfs] [PATCH] daemon/Windows: Define _WIN32_WINNT when compiling on Windows.
-- 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 2001From: 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