[gjs/master.windows: 4/9] gjs/debugger.cpp: Fix build on Windows



commit c99e27e67f601074c68a18cde5207673ea570ede
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Feb 22 13:19:04 2019 +0800

    gjs/debugger.cpp: Fix build on Windows
    
    Don't include unistd.h on Windows, instead include io.h for isatty() and
    define STDIN_FILENO as necessary.

 gjs/debugger.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gjs/debugger.cpp b/gjs/debugger.cpp
index eb6c9f50..28162007 100644
--- a/gjs/debugger.cpp
+++ b/gjs/debugger.cpp
@@ -22,7 +22,14 @@
  * Authored By: Philip Chimento <philip chimento gmail com>
  */
 
-#include <unistd.h>
+#ifdef XP_WIN
+# include <io.h>
+# ifndef STDIN_FILENO
+#  define STDIN_FILENO 0
+# endif
+#else
+# include <unistd.h>
+#endif
 
 #include <gio/gio.h>
 


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