From e251555084b9837a7e813255c1c55632e4274e3e Mon Sep 17 00:00:00 2001 From: stevenwinfield Date: Fri, 21 Aug 2015 13:17:13 +0100 Subject: [PATCH] Prevent enum clash when using Windows SDK v8.0 ProcessDebugPort and ProcessImageFileName are defined in PROCESSINFOCLASS in winternl.h - use the same workaround as ProcessBasicInformation, with underscores and #defines. --- psutil/arch/windows/ntextapi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/psutil/arch/windows/ntextapi.h b/psutil/arch/windows/ntextapi.h index d10432a3e..7f86c57ac 100644 --- a/psutil/arch/windows/ntextapi.h +++ b/psutil/arch/windows/ntextapi.h @@ -186,7 +186,7 @@ typedef enum _PROCESSINFOCLASS2 { ProcessTimes, ProcessBasePriority, ProcessRaisePriority, - ProcessDebugPort, + _ProcessDebugPort, ProcessExceptionPort, ProcessAccessToken, ProcessLdtInformation, @@ -207,7 +207,7 @@ typedef enum _PROCESSINFOCLASS2 { ProcessForegroundInformation, _ProcessWow64Information, /* added after XP+ */ - ProcessImageFileName, + _ProcessImageFileName, ProcessLUIDDeviceMapsEnabled, ProcessBreakOnTermination, ProcessDebugObjectHandle, @@ -224,5 +224,7 @@ typedef enum _PROCESSINFOCLASS2 { #define PROCESSINFOCLASS PROCESSINFOCLASS2 #define ProcessBasicInformation _ProcessBasicInformation #define ProcessWow64Information _ProcessWow64Information +#define ProcessDebugPort _ProcessDebugPort +#define ProcessImageFileName _ProcessImageFileName #endif // __NTEXTAPI_H__