[gnome-session/gnome-3-28] xsmp: don't check for HAVE_XTRANS



commit 3204ee215fc3b03de68e2d7acf357902ca728e0d
Author: Ray Strode <rstrode redhat com>
Date:   Wed Mar 21 15:19:44 2018 -0400

    xsmp: don't check for HAVE_XTRANS
    
    It's not set anymore since the meson switch.
    Instead require the xtrans.pc file to be around.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794575

 gnome-session/gsm-xsmp-server.c |    6 ------
 meson.build                     |    2 ++
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gnome-session/gsm-xsmp-server.c b/gnome-session/gsm-xsmp-server.c
index 1460a28..d558f9b 100644
--- a/gnome-session/gsm-xsmp-server.c
+++ b/gnome-session/gsm-xsmp-server.c
@@ -39,14 +39,12 @@
 #include <X11/ICE/ICEconn.h>
 #include <X11/SM/SMlib.h>
 
-#if HAVE_XTRANS
 /* Get the proto for _IceTransNoListen */
 #define ICE_t
 #define TRANS_SERVER
 #include <X11/Xtrans/Xtrans.h>
 #undef  ICE_t
 #undef TRANS_SERVER
-#endif /* HAVE_XTRANS */
 
 #include "gsm-xsmp-server.h"
 #include "gsm-xsmp-client.h"
@@ -582,7 +580,6 @@ setup_listener (GsmXsmpServer *server)
                 gsm_util_init_error (TRUE, "Could not initialize libSM: %s", error);
         }
 
-#if HAVE_XTRANS
         /* By default, IceListenForConnections will open one socket for each
          * transport type known to X. We don't want connections from remote
          * hosts, so for security reasons it would be best if ICE didn't
@@ -592,7 +589,6 @@ setup_listener (GsmXsmpServer *server)
          * guess.
          */
         _IceTransNoListen ("tcp");
-#endif
 
         /* Create the XSMP socket. Older versions of IceListenForConnections
          * have a bug which causes the umask to be set to 0 on certain types
@@ -634,7 +630,6 @@ setup_listener (GsmXsmpServer *server)
                 gsm_util_init_error (TRUE, "IceListenForConnections did not return a local listener!");
         }
 
-#ifdef HAVE_XTRANS
         if (server->priv->num_local_xsmp_sockets != server->priv->num_xsmp_sockets) {
                 /* Xtrans was apparently compiled with support for some
                  * non-local transport besides TCP (which we disabled above); we
@@ -653,7 +648,6 @@ setup_listener (GsmXsmpServer *server)
                            network_id_list);
                 free (network_id_list);
         }
-#endif
 
         /* Update .ICEauthority with new auth entries for our socket */
         if (!update_iceauthority (server, TRUE)) {
diff --git a/meson.build b/meson.build
index 9eb36a4..6f6d051 100644
--- a/meson.build
+++ b/meson.build
@@ -95,6 +95,7 @@ glib_req_version = '>= 2.46.0'
 gio_dep = dependency('gio-2.0', version: glib_req_version)
 glib_dep = dependency('glib-2.0', version: glib_req_version)
 gtk_dep = dependency('gtk+-3.0', version: '>= 3.18.0')
+xtrans_dep = dependency('xtrans')
 ice_dep = dependency('ice')
 sm_dep = dependency('sm')
 x11_dep = dependency('x11')
@@ -107,6 +108,7 @@ session_deps = [
 ]
 
 session_bin_deps = session_deps + [
+  xtrans_dep,
   ice_dep,
   sm_dep
 ]


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