From fa0c16659e3f025cf35b2ef2b3678ef9c934528d Mon Sep 17 00:00:00 2001 From: Andy Hu Date: Sat, 20 May 2023 00:57:30 +0800 Subject: [PATCH] package/bluez5_utils: fix compiler error for gcc 12.2.0 Keep the bluez5_utils-headers version and patches in sync with bluez5_utils Signed-off-by: Andy Hu --- ...ix-the-compiler-issue-for-gcc-12.2.0.patch | 38 +++++++++++++++++++ .../bluez5_utils-headers.mk | 2 +- ...ix-the-compiler-issue-for-gcc-12.2.0.patch | 38 +++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 package/bluez5_utils-headers/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch create mode 100644 package/bluez5_utils/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch diff --git a/package/bluez5_utils-headers/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch b/package/bluez5_utils-headers/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch new file mode 100644 index 00000000..1b1027c9 --- /dev/null +++ b/package/bluez5_utils-headers/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch @@ -0,0 +1,38 @@ +From 5f74b142f1bcb8003d6e84f71c7b958818756f3c Mon Sep 17 00:00:00 2001 +From: Andy Hu +Date: Fri, 19 May 2023 23:30:56 +0800 +Subject: [PATCH] bluez5_utils: fix the compiler issue for gcc 12.2.0 + +fix the conflicting types for 'pause'; have '_Bool(void *)' +which had defined in /usr/include/unistd.h is 'int pause (void)' + +Signed-off-by: Andy Hu +--- + 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 02bf82a..0892532 100644 +--- a/profiles/audio/media.c ++++ b/profiles/audio/media.c +@@ -1280,7 +1280,7 @@ static bool stop(void *user_data) + return media_player_send(mp, "Stop"); + } + +-static bool pause(void *user_data) ++static bool func_pause(void *user_data) + { + struct media_player *mp = user_data; + +@@ -1330,7 +1330,7 @@ static struct avrcp_player_cb player_cb = { + .set_volume = set_volume, + .play = play, + .stop = stop, +- .pause = pause, ++ .pause = func_pause, + .next = next, + .previous = previous, + }; +-- +2.34.1 + diff --git a/package/bluez5_utils-headers/bluez5_utils-headers.mk b/package/bluez5_utils-headers/bluez5_utils-headers.mk index e6714310..a2e22148 100644 --- a/package/bluez5_utils-headers/bluez5_utils-headers.mk +++ b/package/bluez5_utils-headers/bluez5_utils-headers.mk @@ -5,7 +5,7 @@ ################################################################################ # Keep the version and patches in sync with bluez5_utils -BLUEZ5_UTILS_HEADERS_VERSION = 5.62 +BLUEZ5_UTILS_HEADERS_VERSION = 5.55 BLUEZ5_UTILS_HEADERS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz BLUEZ5_UTILS_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth BLUEZ5_UTILS_HEADERS_DL_SUBDIR = bluez5_utils diff --git a/package/bluez5_utils/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch b/package/bluez5_utils/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch new file mode 100644 index 00000000..1b1027c9 --- /dev/null +++ b/package/bluez5_utils/0001-bluez5_utils-fix-the-compiler-issue-for-gcc-12.2.0.patch @@ -0,0 +1,38 @@ +From 5f74b142f1bcb8003d6e84f71c7b958818756f3c Mon Sep 17 00:00:00 2001 +From: Andy Hu +Date: Fri, 19 May 2023 23:30:56 +0800 +Subject: [PATCH] bluez5_utils: fix the compiler issue for gcc 12.2.0 + +fix the conflicting types for 'pause'; have '_Bool(void *)' +which had defined in /usr/include/unistd.h is 'int pause (void)' + +Signed-off-by: Andy Hu +--- + 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 02bf82a..0892532 100644 +--- a/profiles/audio/media.c ++++ b/profiles/audio/media.c +@@ -1280,7 +1280,7 @@ static bool stop(void *user_data) + return media_player_send(mp, "Stop"); + } + +-static bool pause(void *user_data) ++static bool func_pause(void *user_data) + { + struct media_player *mp = user_data; + +@@ -1330,7 +1330,7 @@ static struct avrcp_player_cb player_cb = { + .set_volume = set_volume, + .play = play, + .stop = stop, +- .pause = pause, ++ .pause = func_pause, + .next = next, + .previous = previous, + }; +-- +2.34.1 +