[gjs/master.windows: 3/9] gjs/debugger.cpp: Fix build on Windows
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/master.windows: 3/9] gjs/debugger.cpp: Fix build on Windows
- Date: Fri, 22 Feb 2019 11:15:43 +0000 (UTC)
commit d9b255e3108ec800448f38b83db27fa5141f1878
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 | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/gjs/debugger.cpp b/gjs/debugger.cpp
index eb6c9f50..7e4614c4 100644
--- a/gjs/debugger.cpp
+++ b/gjs/debugger.cpp
@@ -22,10 +22,18 @@
* Authored By: Philip Chimento <philip chimento gmail com>
*/
-#include <unistd.h>
#include <gio/gio.h>
+#ifdef G_OS_WIN32
+# include <io.h>
+# ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+# endif
+#else
+# include <unistd.h>
+#endif
+
#include "gjs/context-private.h"
#include "gjs/global.h"
#include "gjs/jsapi-util-args.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]