at-spi2-core/0001-bus-launch-use-__linux__-over-__linux.patch
David Herrmann 3af57777ad at-spi2-core: use dbus-broker if available
The at-spi2-core now has upstream support for alternative
bus-implementations, mainly 'dbus-broker' over 'dbus-daemon'. If a path
to either binary is provided at compile time, at-spi2 will try the
given bus implementation at runtime. Since Fedora provides two
alternatives, we make at-spi2 use both. Note that at-spi2 falls back to
the alternative if the primary pick is not available.

We keep the 'Requires: dbus' dependency. The 'dbus' package was turned
into a meta-package. Right now it pulls in either 'dbus-daemon' or
'dbus-broker', but in the future it will be a real meta-package and be
'Provides: dbus' by both dbus-daemon and dbus-broker. Hence, the
depdency is sufficient to guarantee that at least one bus
implementation is available on the machine.

Given that dbus-broker will be the default bus implementation in F29,
this patch also switches the at-spi2 default to 'dbus-broker'. Again,
this will safely fall-back to 'dbus-daemon' at runtime if dbus-broker
is unavailable.

(dvdhrm: This is based on zbyszek's original patch, but now highly
         modified by me.)

v2:
 - fix __linux__ vs __linux preprocessor define

v3:
 - backport the __linux__ fix to 2.28.0 to make it apply cleanly
2018-08-10 16:36:46 +02:00

42 lines
1.1 KiB
Diff

From 85dedf4125d2107a4b095bbafe482bf6ecfd06f1 Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Fri, 10 Aug 2018 16:35:31 +0200
Subject: [PATCH] bus-launch: use __linux__ over __linux
The canonical way to check for linux support is '__linux__', not
'__linux'. Particularly, on ppc64le '__linux' is not defined and the
build will fail.
For reference, see:
https://sourceforge.net/p/predef/wiki/OperatingSystems/
---
bus/at-spi-bus-launcher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
index 8aeb490..8fa566f 100644
--- a/bus/at-spi-bus-launcher.c
+++ b/bus/at-spi-bus-launcher.c
@@ -25,7 +25,7 @@
#include <unistd.h>
#include <string.h>
#include <signal.h>
-#ifdef __linux
+#ifdef __linux__
#include <sys/prctl.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -232,7 +232,7 @@ setup_bus_child_daemon (gpointer data)
close (app->pipefd[1]);
/* On Linux, tell the bus process to exit if this process goes away */
-#ifdef __linux
+#ifdef __linux__
prctl (PR_SET_PDEATHSIG, 15);
#endif
}
--
2.18.0