Lib: fix mingw build for older versions of mingw

This define was introduced to winternl.h on 2012-07-12 but I couldn't find out which version that corresponds to. At least version 2.0.1-1 of mingw-w64-dev in Ubuntu 12.04 LTS does not define it.
This commit is contained in:
Christian Beer 2017-02-17 14:48:48 +01:00
parent 2370eba78f
commit cf8f94f38b
1 changed files with 7 additions and 0 deletions

View File

@ -150,4 +150,11 @@ typedef enum _THREAD_WAIT_REASON {
} THREAD_WAIT_REASON;
#endif
// older mingw versions (before 2012-07-12) do not define this in winternl.h
#if defined(__MINGW32__)
#ifndef NT_SUCCESS
#define NT_SUCCESS(status) ((NTSTATUS) (status) >= 0)
#endif
#endif
#endif