[glib] gwin32.c: Fix build on MinGW
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gwin32.c: Fix build on MinGW
- Date: Tue, 5 Jan 2016 07:15:53 +0000 (UTC)
commit 786b4c8b8782e8ce62085595a8a87838307af8ba
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jan 5 15:08:18 2016 +0800
gwin32.c: Fix build on MinGW
Apparently unlike mingw-w64 and Visual Studio, MinGW does not come with
winternl.h, which defines NTSTATUS, so we need to include ntdef.h instead
on MinGW for NTSTATUS.
Based on patch by Cédric Krier.
https://bugzilla.gnome.org/show_bug.cgi?id=756875
glib/gwin32.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib/gwin32.c b/glib/gwin32.c
index 4c89651..0a9b2cf 100644
--- a/glib/gwin32.c
+++ b/glib/gwin32.c
@@ -59,6 +59,9 @@
#ifdef _MSC_VER
#pragma comment (lib, "ntoskrnl.lib")
#endif
+#elif defined (__MINGW32__)
+/* mingw-w64, not MinGW, has winternl.h */
+#include <ntdef.h>
#else
#include <winternl.h>
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]