mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-03 00:00:24 -04:00
backtrace: Fix build with newer MinGW versions
A recent change added CALLBACK to PENUM_PAGE_FILE_CALLBACKW/A in psapi.h, which conflicts with our own macro of the same name. Our compat/windows.h header undefs the Windows definition, but that only works if Windows headers are included before ours, which wasn't the case for psapi.h.
This commit is contained in:
parent
f16a12eae5
commit
2bf110d9f8
@ -15,23 +15,20 @@
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_BACKTRACE
|
||||
# include <execinfo.h>
|
||||
#endif /* HAVE_BACKTRACE */
|
||||
#ifdef HAVE_DBGHELP
|
||||
# include <winsock2.h>
|
||||
# include <windows.h>
|
||||
# include <dbghelp.h>
|
||||
#endif /* HAVE_DBGHELP */
|
||||
#include <string.h>
|
||||
|
||||
#include "backtrace.h"
|
||||
|
||||
#include <utils/debug.h>
|
||||
#ifdef HAVE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
#endif /* HAVE_BACKTRACE */
|
||||
|
||||
#ifdef WIN32
|
||||
# include <psapi.h>
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#ifdef HAVE_DBGHELP
|
||||
#include <dbghelp.h>
|
||||
#endif /* HAVE_DBGHELP */
|
||||
|
||||
#include <psapi.h>
|
||||
/* missing in MinGW */
|
||||
#ifdef WIN64
|
||||
#ifndef GetModuleInformation
|
||||
@ -47,6 +44,10 @@ DWORD K32GetModuleFileNameExA(HANDLE hProcess, HMODULE hModule,
|
||||
#endif /* WIN64 */
|
||||
#endif
|
||||
|
||||
#include "backtrace.h"
|
||||
|
||||
#include <utils/debug.h>
|
||||
|
||||
typedef struct private_backtrace_t private_backtrace_t;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user