[at-spi2-core] Use abstract sockets if libdbus is older than 1.12.0



commit 9ccedbcfa4df5a6375d715de06f7c3e16a8bccd3
Author: Mike Gorse <mgorse suse com>
Date:   Tue Jul 6 13:54:44 2021 -0500

    Use abstract sockets if libdbus is older than 1.12.0
    
    Fixes #37

 bus/accessibility.conf.in | 2 +-
 bus/meson.build           | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/bus/accessibility.conf.in b/bus/accessibility.conf.in
index 79c5146..33d6e1c 100644
--- a/bus/accessibility.conf.in
+++ b/bus/accessibility.conf.in
@@ -6,7 +6,7 @@
 <servicedir>@DATADIR@/dbus-1/accessibility-services</servicedir>
   <auth>EXTERNAL</auth>
 
-  <listen>unix:dir=/tmp</listen>
+  <listen>@SOCKET_ADDRESS@</listen>
 
   <policy context="default">
     <!-- Allow root to connect -->
diff --git a/bus/meson.build b/bus/meson.build
index 3504fb3..21408f2 100644
--- a/bus/meson.build
+++ b/bus/meson.build
@@ -4,6 +4,12 @@ libexec_conf.set('libexecdir', atspi_libexecdir)
 accessibility_conf = configuration_data()
 accessibility_conf.set('DATADIR', atspi_datadir)
 
+if libdbus_dep.version().version_compare('>= 1.12.0')
+  accessibility_conf.set('SOCKET_ADDRESS', 'unix:dir=/tmp')
+else
+  accessibility_conf.set('SOCKET_ADDRESS', 'unix:tmpdir=/tmp')
+endif
+
 busconfig_dir = join_paths(atspi_datadir, 'defaults/at-spi2')
 session_dir = join_paths(atspi_sysconfdir, 'xdg/autostart')
 xwayland_session_dir = join_paths(atspi_sysconfdir, 'xdg/Xwayland-session.d')


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