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.
This commit is contained in:
Jon Turney 2021-05-20 18:28:01 +01:00
parent bce3563e98
commit a9c8050c36
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
1 changed files with 1 additions and 0 deletions

View 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>