]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: Ensure PSAPI_VERSION is 1 when building ldd
authorJon Turney <jon.turney@dronecode.org.uk>
Thu, 20 May 2021 17:28:01 +0000 (18:28 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Sat, 22 May 2021 15:06:51 +0000 (16:06 +0100)
The default PSAPI_VERSION is controlled by WIN32_WINNT, which we set to
0x0a00 when building ldd, which gets PSAPI_VERSION=2.

This causes K32GetModuleFileNameEx to be used for GetModuleFileNameEx,
which isn't available on Windows Vista.

Define PSAPI_VERSION as 1 for the built executable to work on Windows
Vista.

winsup/utils/ldd.cc

index 183e02cd4ae070df4631b016da1546a77a5279e2..cc13496555ac05225f63996785e7dad031c14fb2 100644 (file)
@@ -38,6 +38,7 @@
 #include <libgen.h>
 
 #define _WIN32_WINNT 0x0a00
+#define PSAPI_VERSION 1
 #include <windows.h>
 #include <winternl.h>
 #include <imagehlp.h>
This page took 0.032371 seconds and 5 git commands to generate.