aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorB. Scott Michel <scooter.phd@gmail.com>2025-01-30 02:00:10 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-01-30 02:00:10 +0100
commit58e749454d1fb0ab3eb3864e5d71fca552e4ed2b (patch)
tree7d9db7c74c029959c3ebc336a068277281c01196 /src
parentf1533e1b6b27def2dfed955dcd678276e32887b0 (diff)
downloadslirp-58e749454d1fb0ab3eb3864e5d71fca552e4ed2b.zip
slirp-58e749454d1fb0ab3eb3864e5d71fca552e4ed2b.tar.gz
slirp-58e749454d1fb0ab3eb3864e5d71fca552e4ed2b.tar.bz2
ensure that WINVER and _WIN32_WINNT are unconditionally set
if TARGET_WINVER is defined.
Diffstat (limited to 'src')
-rw-r--r--src/slirp.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/slirp.h b/src/slirp.h
index 3d5179e..016cab8 100644
--- a/src/slirp.h
+++ b/src/slirp.h
@@ -3,12 +3,22 @@
#define SLIRP_H
#ifdef _WIN32
+
+#if defined(TARGET_WINVER)
/* TARGET_WINVER defined on the compiler command line? */
-#if defined(TARGET_WINVER) && !defined(WINVER)
+
+# undef WINVER
+# undef _WIN32_WINNT
# define WINVER TARGET_WINVER
-/* Default WINVER to Windows 7 API, same as glib. */
+# define _WIN32_WINNT TARGET_WINVER
+
#elif !defined(WINVER)
+/* Default WINVER to Windows 7 API, same as glib. */
+# undef _WIN32_WINNT
+
# define WINVER 0x0601
+# define _WIN32_WINNT WINVER
+
#endif
/* Ensure that _WIN32_WINNT matches WINVER */