configure.ac: define WINVER
Ensure that WINVER is defined early enough, so other system headers won't fall back to their default value. Specifically, this solves a build failure (-Werror) with mingw-w64 ("WINVER redefined").
This commit is contained in:
parent
d394017926
commit
c30c46cd5f
1
NEWS
1
NEWS
|
@ -1,5 +1,6 @@
|
||||||
ver 0.16.6 (2010/??/??)
|
ver 0.16.6 (2010/??/??)
|
||||||
* event_pipe: fix WIN32 regression
|
* event_pipe: fix WIN32 regression
|
||||||
|
* define WINVER in ./configure
|
||||||
|
|
||||||
|
|
||||||
ver 0.16.5 (2010/10/09)
|
ver 0.16.5 (2010/10/09)
|
||||||
|
|
|
@ -68,6 +68,7 @@ AC_CANONICAL_HOST
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
mingw32* | windows*)
|
mingw32* | windows*)
|
||||||
|
AM_CPPFLAGS="$AM_CPPFLAGS -DWINVER=0x0501"
|
||||||
MPD_LIBS="$MPD_LIBS -lws2_32"
|
MPD_LIBS="$MPD_LIBS -lws2_32"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#define WINVER 0x0501
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
static int service_argc;
|
static int service_argc;
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define WINVER 0x0501
|
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#else /* G_OS_WIN32 */
|
#else /* G_OS_WIN32 */
|
||||||
#define WINVER 0x0501
|
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#endif /* G_OS_WIN32 */
|
#endif /* G_OS_WIN32 */
|
||||||
|
|
Loading…
Reference in New Issue