[gtk/wip/nirbheek/gtk-3-24-meson: 3/5] gtk-launch: Fix compilation	with MSVC
- From: Nirbheek Chauhan <nirbheekc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk/wip/nirbheek/gtk-3-24-meson: 3/5] gtk-launch: Fix compilation	with MSVC
 
- Date: Tue, 20 Nov 2018 11:34:32 +0000 (UTC)
 
commit 60150b1796ca5aa78b12cded0f7d29985209f7b1
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]