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:
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user