summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrahmajit das <listout@protonmail.com>2023-01-21 22:05:05 +0530
committerSam James <sam@gentoo.org>2023-01-31 05:55:20 +0000
commit4a5a1d52e9a5ebdd5e8011ea933765bda0c838b6 (patch)
tree2f58d512d414714d964cc2b15a6b24ef7626ad3c
parentnet-misc/rinetd: drop 0.62-r3 (diff)
downloadgentoo-4a5a1d52.tar.gz
gentoo-4a5a1d52.tar.bz2
gentoo-4a5a1d52.zip
net-wireless/bluez: fix 'MAX_INPUT' undeclared in musl
musl does provide _POSIX_MAX_INPUT, but no MAX_INPUT out of the box. This commit assigns _POSIX_MAX_INPUT to MAX_INPUT. Closes: https://bugs.gentoo.org/888467 Signed-off-by: brahmajit das <listout@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/29209 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-wireless/bluez/bluez-5.66-r1.ebuild4
-rw-r--r--net-wireless/bluez/files/bluez-5.66-musl-max-input.patch19
2 files changed, 23 insertions, 0 deletions
diff --git a/net-wireless/bluez/bluez-5.66-r1.ebuild b/net-wireless/bluez/bluez-5.66-r1.ebuild
index 4278549b3ee0..639e234d67c2 100644
--- a/net-wireless/bluez/bluez-5.66-r1.ebuild
+++ b/net-wireless/bluez/bluez-5.66-r1.ebuild
@@ -77,6 +77,10 @@ PATCHES=(
# Fixed in next release
"${FILESDIR}"/${P}-transient-hostname-fix.patch
+
+ # https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a
+ # https://bugs.gentoo.org/888467
+ "${FILESDIR}"/${PN}-5.66-musl-max-input.patch
)
pkg_setup() {
diff --git a/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch b/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch
new file mode 100644
index 000000000000..d8bdb3316e49
--- /dev/null
+++ b/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch
@@ -0,0 +1,19 @@
+# https://lore.kernel.org/linux-bluetooth/20230131055258.3311810-1-sam@gentoo.org/T/#u
+# musl does provide _POSIX_MAX_INPUT, but no MAX_INPUT out of the box.
+# This patch assigns _POSIX_MAX_INPUT to MAX_INPUT.
+# Please refer: https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a
+# https://bugs.gentoo.org/888467
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -28,6 +28,11 @@
+ #include <sys/random.h>
+ #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)