[packages/bluez] fix build with glibc 2.34; rel 2

atler atler at pld-linux.org
Mon Aug 23 11:41:50 CEST 2021


commit ad6434db988fe07429dff24e456af8636a03a2cc
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Aug 23 11:38:56 2021 +0200

    fix build with glibc 2.34; rel 2
    
    unistd.h is now included indirectly causing signature conflict:
    
    profiles/audio/media.c:1284:13: error: conflicting types for 'pause'; have '_Bool(void *)'
     1284 | static bool pause(void *user_data)
          |             ^~~~~
    In file included from /usr/include/bits/sigstksz.h:24,
                     from /usr/include/signal.h:328,
                     from /usr/include/glib-2.0/glib/gbacktrace.h:36,
                     from /usr/include/glib-2.0/glib.h:34,
                     from profiles/audio/media.c:21:
    /usr/include/unistd.h:489:12: note: previous declaration of 'pause' with type 'int(void)'
      489 | extern int pause (void);
          |            ^~~~~

 bluez.spec      |  4 +++-
 glibc2.34.patch | 20 ++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)
---
diff --git a/bluez.spec b/bluez.spec
index fea28d5..2335842 100644
--- a/bluez.spec
+++ b/bluez.spec
@@ -9,7 +9,7 @@ Summary:	Bluetooth utilities
 Summary(pl.UTF-8):	Narzędzia Bluetooth
 Name:		bluez
 Version:	5.61
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Applications/System
 Source0:	https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
@@ -22,6 +22,7 @@ Source3:	69-btattach-bcm.rules
 Source4:	btattach-bcm at .service
 Source5:	btattach-bcm-service.sh
 Patch0:		0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
+Patch1:		glibc2.34.patch
 URL:		http://www.bluez.org/
 BuildRequires:	alsa-lib-devel >= 1.0
 BuildRequires:	autoconf >= 2.60
@@ -179,6 +180,7 @@ aplikacji Bluetooth.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 # external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules
 %{__rm} -r ell
diff --git a/glibc2.34.patch b/glibc2.34.patch
new file mode 100644
index 0000000..7639e68
--- /dev/null
+++ b/glibc2.34.patch
@@ -0,0 +1,20 @@
+--- bluez-5.61/profiles/audio/media.c.orig	2021-07-07 15:45:55.000000000 +0200
++++ bluez-5.61/profiles/audio/media.c	2021-08-23 11:36:23.090317414 +0200
+@@ -1281,7 +1281,7 @@
+ 	return media_player_send(mp, "Stop");
+ }
+ 
+-static bool pause(void *user_data)
++static bool bluez_media_pause(void *user_data)
+ {
+ 	struct media_player *mp = user_data;
+ 
+@@ -1331,7 +1331,7 @@
+ 	.set_volume = set_volume,
+ 	.play = play,
+ 	.stop = stop,
+-	.pause = pause,
++	.pause = bluez_media_pause,
+ 	.next = next,
+ 	.previous = previous,
+ };
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bluez.git/commitdiff/ad6434db988fe07429dff24e456af8636a03a2cc



More information about the pld-cvs-commit mailing list