[gobject-introspection/fix-msvc-warnings: 65/65] scannerparser.y: Include io.h on Windows




commit 53861fa33c952ece1cd7aab82f61bd6f1362d945
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Sep 23 13:30:21 2021 +0800

    scannerparser.y: Include io.h on Windows
    
    We need it for close(), especially when unistd.h is not available, such as in
    the case of Visual Studio-style builds.

 giscanner/scannerparser.y | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y
index b304a298..c6f9f92e 100644
--- a/giscanner/scannerparser.y
+++ b/giscanner/scannerparser.y
@@ -36,6 +36,10 @@
 #include "sourcescanner.h"
 #include "scannerparser.h"
 
+#ifdef G_OS_WIN32
+#include <io.h>
+#endif
+
 extern FILE *yyin;
 extern int lineno;
 extern char linebuf[2000];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]