From: Jon Turney Date: Thu, 20 May 2021 17:28:01 +0000 (+0100) Subject: Cygwin: Ensure PSAPI_VERSION is 1 when building ldd X-Git-Tag: cygwin-3_3_0-release~191 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=a9c8050c363cfaa959004231adad8456b4df5c32;p=newlib-cygwin.git Cygwin: Ensure PSAPI_VERSION is 1 when building ldd 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. --- diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc index 183e02cd4..cc1349655 100644 --- a/winsup/utils/ldd.cc +++ b/winsup/utils/ldd.cc @@ -38,6 +38,7 @@ #include #define _WIN32_WINNT 0x0a00 +#define PSAPI_VERSION 1 #include #include #include