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>
This commit is contained in:
brahmajit das
2023-01-21 22:05:05 +05:30
committed by Sam James
parent 0496527537
commit 4a5a1d52e9
2 changed files with 23 additions and 0 deletions

View File

@@ -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() {

View File

@@ -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)