[gtk/wip/nirbheek/gtk-3-24-meson] gtk-launch: Fix compilation with MSVC



commit 40cad55b96b08d1757b6d5de7527889f92a9df1b
Author: Nirbheek Chauhan <nirbheek centricular com>
Date:   Tue Nov 20 16:08:02 2018 +0530

    gtk-launch: Fix compilation with MSVC

 gtk/gtk-launch.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtk-launch.c b/gtk/gtk-launch.c
index ccf1bd8d4b..87b351bf2a 100644
--- a/gtk/gtk-launch.c
+++ b/gtk/gtk-launch.c
@@ -21,7 +21,9 @@
 #include <config.h>
 
 #include <stdio.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <locale.h>
 #include <errno.h>
 
@@ -136,7 +138,9 @@ main (int argc, char *argv[])
   info = G_APP_INFO (g_desktop_app_info_new (desktop_file_name));
   g_free (desktop_file_name);
 #else
-#warning Please add support for creating AppInfo from id for your OS
+  #ifndef _MSC_VER
+    #warning Please add support for creating AppInfo from id for your OS
+  #endif
   g_printerr (_("Creating AppInfo from id not supported on non unix operating systems"));
 #endif
   args++;


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