summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-05-01 10:46:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-02 23:21:39 +0100
commitd5e0d319fc714a5af59ebec0b3a89851c04a6c4f (patch)
tree69baefda3253e6f75ab2a14d6c50d7c57252bc97 /meta/recipes-connectivity
parent44ca8edd622782733d507e20a3d5ee9e44eb8be4 (diff)
downloadopenembedded-core-d5e0d319fc714a5af59ebec0b3a89851c04a6c4f.tar.gz
bluez: Fix shadowing of pause function from libc
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5.inc1
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch48
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index a7b628ce1b..74b59e406c 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -52,6 +52,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
file://0001-test-gatt-Fix-hung-issue.patch \
+ file://0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch \
"
S = "${WORKDIR}/bluez-${PV}"
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch
new file mode 100644
index 0000000000..d9067df02d
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/0001-audio-Rename-pause-funciton-to-avoid-shadowing-glibc.patch
@@ -0,0 +1,48 @@
+From 8adab7f1e04948e78854953f9373cac741445a0f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 30 Apr 2021 21:09:33 -0700
+Subject: [PATCH] audio: Rename pause funciton to avoid shadowing glibc
+ defintions
+
+Fixes
+profiles/audio/media.c:1284:13: error: static declaration of 'pause' follows non-static declaration
+static bool pause(void *user_data)
+ ^
+/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/bluez5/5.56-r0/recipe-sysroot/usr/include/unistd.h:478:12: note: previous declaration is here
+extern int pause (void);
+ ^
+../bluez-5.56/profiles/audio/media.c:1334:11: warning: incompatible function pointer types initializing 'bool (*)(void *)' with an expression of type 'int (void)' [-Wincompatible-function-pointer-types]
+ .pause = pause,
+ ^~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ profiles/audio/media.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/profiles/audio/media.c b/profiles/audio/media.c
+index c84bbe2..7110089 100644
+--- a/profiles/audio/media.c
++++ b/profiles/audio/media.c
+@@ -1281,7 +1281,7 @@ static bool stop(void *user_data)
+ return media_player_send(mp, "Stop");
+ }
+
+-static bool pause(void *user_data)
++static bool apause(void *user_data)
+ {
+ struct media_player *mp = user_data;
+
+@@ -1331,7 +1331,7 @@ static struct avrcp_player_cb player_cb = {
+ .set_volume = set_volume,
+ .play = play,
+ .stop = stop,
+- .pause = pause,
++ .pause = apause,
+ .next = next,
+ .previous = previous,
+ };
+--
+2.31.1
+