Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/bluez
diff options
context:
space:
mode:
Diffstat (limited to 'extra/bluez')
-rw-r--r--extra/bluez/PKGBUILD12
-rw-r--r--extra/bluez/bluez-5.50-signal-signature-btpclient.patch55
2 files changed, 67 insertions, 0 deletions
diff --git a/extra/bluez/PKGBUILD b/extra/bluez/PKGBUILD
new file mode 100644
index 00000000..80102bee
--- /dev/null
+++ b/extra/bluez/PKGBUILD
@@ -0,0 +1,12 @@
+source+=('bluez-5.50-signal-signature-btpclient.patch')
+sha512sums+=('c291cfcbb360d0c5d8e9c1aaf24739251193c39bc49a29b1db579979d0a387e4721398e44588fbeb8ebb04dc84016f15c54706435424d9b0fad87edac2c351ce')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i patch -p1 -i "$srcdir/bluez-5.50-signal-signature-btpclient.patch"
+ '
+)"
+
+# for now, tons os segfaults, don't assume, Bluetooth will work!
+unset check
diff --git a/extra/bluez/bluez-5.50-signal-signature-btpclient.patch b/extra/bluez/bluez-5.50-signal-signature-btpclient.patch
new file mode 100644
index 00000000..3c2dc935
--- /dev/null
+++ b/extra/bluez/bluez-5.50-signal-signature-btpclient.patch
@@ -0,0 +1,55 @@
+diff -rauN bluez-5.50/tools/btpclient.c bluez-5.50-signal-signature-btpclient-patch/tools/btpclient.c
+--- bluez-5.50/tools/btpclient.c 2018-03-10 16:37:07.000000000 +0100
++++ bluez-5.50-signal-signature-btpclient-patch/tools/btpclient.c 2019-07-31 19:36:58.022464813 +0200
+@@ -29,6 +29,7 @@
+ #include <stdlib.h>
+ #include <assert.h>
+ #include <getopt.h>
++#include <signal.h>
+
+ #include <ell/ell.h>
+
+@@ -2827,8 +2828,7 @@
+ btp_core_unregister, NULL, NULL);
+ }
+
+-static void signal_handler(struct l_signal *signal, uint32_t signo,
+- void *user_data)
++static void signal_handler(uint32_t signo, void *user_data)
+ {
+ switch (signo) {
+ case SIGINT:
+@@ -3156,8 +3156,6 @@
+ int main(int argc, char *argv[])
+ {
+ struct l_dbus_client *client;
+- struct l_signal *signal;
+- sigset_t mask;
+ int opt;
+
+ l_log_set_stderr();
+@@ -3194,11 +3192,6 @@
+
+ adapters = l_queue_new();
+
+- sigemptyset(&mask);
+- sigaddset(&mask, SIGINT);
+- sigaddset(&mask, SIGTERM);
+- signal = l_signal_create(&mask, signal_handler, NULL, NULL);
+-
+ dbus = l_dbus_new_default(L_DBUS_SYSTEM_BUS);
+ l_dbus_set_ready_handler(dbus, ready_callback, NULL, NULL);
+ client = l_dbus_client_new(dbus, "org.bluez", "/org/bluez");
+@@ -3212,11 +3205,10 @@
+
+ l_dbus_client_set_ready_handler(client, client_ready, NULL, NULL);
+
+- l_main_run();
++ l_main_run_with_signal(signal_handler, NULL);
+
+ l_dbus_client_destroy(client);
+ l_dbus_destroy(dbus);
+- l_signal_remove(signal);
+ btp_cleanup(btp);
+
+ l_queue_destroy(adapters, (l_queue_destroy_func_t)btp_adapter_free);