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




commit 663212141da0479d4369a07fc1de472d6e746aab
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]