summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2011-01-27 20:07:06 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2011-01-27 20:07:24 +0100
commitb463963068b76337b05723d9702612e19dbbab85 (patch)
tree95311b02ce9129350c17ed00e845af7c1108479c
parent46be1ca0485fd2e6dcb1b43fb43ffa37e7f3a3f7 (diff)
gtk: fix windows build
-rw-r--r--configure.ac1
-rw-r--r--gtk/spice-channel.c6
-rw-r--r--gtk/vncdisplaykeymap.c6
3 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 7eccf30..b38949f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,6 +103,7 @@ AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
AC_CHECK_HEADERS([sys/ipc.h sys/shm.h])
+AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h])
dnl =========================================================================
dnl Chek optional features
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index eac2443..6140407 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -28,9 +28,15 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
#include <ctype.h>
#include "gio-coroutine.h"
diff --git a/gtk/vncdisplaykeymap.c b/gtk/vncdisplaykeymap.c
index a58605c..26a71a4 100644
--- a/gtk/vncdisplaykeymap.c
+++ b/gtk/vncdisplaykeymap.c
@@ -76,7 +76,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
/* Gtk2 compat */
#ifndef GDK_IS_X11_DISPLAY
-#define GDK_IS_X11_DISPLAY(dpy) 1
+#define GDK_IS_X11_DISPLAY(dpy) (dpy == dpy)
#endif
#endif
@@ -86,7 +86,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
/* Gtk2 compat */
#ifndef GDK_IS_WIN32_DISPLAY
-#define GDK_IS_WIN32_DISPLAY(dpy) 1
+#define GDK_IS_WIN32_DISPLAY(dpy) (dpy == dpy)
#endif
#endif
@@ -96,7 +96,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
/* Gtk2 compat */
#ifndef GDK_IS_QUARTZ_DISPLAY
-#define GDK_IS_QUARTZ_DISPLAY(dpy) 1
+#define GDK_IS_QUARTZ_DISPLAY(dpy) (dpy == dpy)
#endif
#endif