From 95b8e7245d018b1f12bec43a22071a0a9f81df68 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 28 Mar 2023 14:27:11 -0700 Subject: [PATCH] package/bluez5_utils: Fix builds with musl-libc Backport upstream commit ca6546fe521360fcf905bc115b893f322e706cb2 ("shared: define MAX_INPUT for musl") to fix builds with musl-libc. Fixes: - http://autobuild.buildroot.net/results/3fd24a604a29eff70e20f82690e3f058f04903f9/ - http://autobuild.buildroot.net/results/bd57f1813be699cd5ce2ae94f5f511a71fe10428/ - http://autobuild.buildroot.net/results/90d528cc18a367af2f68e1c0673d962fe399e1ac/ - http://autobuild.buildroot.net/results/552b700ee129e1c7f651de13f6766eae5325dcbc/ Signed-off-by: Florian Fainelli Signed-off-by: Arnout Vandecappelle --- .../bluez5_utils/0001-musl-max-input.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/bluez5_utils/0001-musl-max-input.patch diff --git a/package/bluez5_utils/0001-musl-max-input.patch b/package/bluez5_utils/0001-musl-max-input.patch new file mode 100644 index 0000000000..8612bac07f --- /dev/null +++ b/package/bluez5_utils/0001-musl-max-input.patch @@ -0,0 +1,37 @@ +From ca6546fe521360fcf905bc115b893f322e706cb2 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Tue, 31 Jan 2023 05:52:58 +0000 +Subject: shared: define MAX_INPUT for musl + +musl systems don't have MAX_INPUT. Just define it to _POSIX_MAX_INPUT +which musl does have if it's not already defined. + +Note that on glibc, the values match anyway (as of glibc-2.36), and +indeed POSIX_MAX_INPUT has the same value on musl too. + +Bug: https://bugs.gentoo.org/888467 +Upstream: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=ca6546fe521360fcf905bc115b893f322e706cb2 +Signed-off-by: Florian Fainelli +--- + src/shared/util.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/shared/util.c b/src/shared/util.c +index 2f0ae0e86..b466fb001 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -28,6 +28,11 @@ + #include + #endif + ++/* define MAX_INPUT for musl */ ++#ifndef MAX_INPUT ++#define MAX_INPUT _POSIX_MAX_INPUT ++#endif ++ + #include "src/shared/util.h" + + void *util_malloc(size_t size) +-- +cgit +