Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/bluez/, net-wireless/bluez/files/
Date: Tue, 31 Jan 2023 05:56:31
Message-Id: 1675144520.4a5a1d52e9a5ebdd5e8011ea933765bda0c838b6.sam@gentoo
1 commit: 4a5a1d52e9a5ebdd5e8011ea933765bda0c838b6
2 Author: brahmajit das <listout <AT> protonmail <DOT> com>
3 AuthorDate: Sat Jan 21 16:35:05 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 31 05:55:20 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a5a1d52
7
8 net-wireless/bluez: fix 'MAX_INPUT' undeclared in musl
9
10 musl does provide _POSIX_MAX_INPUT, but no MAX_INPUT out of the box.
11 This commit assigns _POSIX_MAX_INPUT to MAX_INPUT.
12
13 Closes: https://bugs.gentoo.org/888467
14 Signed-off-by: brahmajit das <listout <AT> protonmail.com>
15 Closes: https://github.com/gentoo/gentoo/pull/29209
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 net-wireless/bluez/bluez-5.66-r1.ebuild | 4 ++++
19 .../bluez/files/bluez-5.66-musl-max-input.patch | 19 +++++++++++++++++++
20 2 files changed, 23 insertions(+)
21
22 diff --git a/net-wireless/bluez/bluez-5.66-r1.ebuild b/net-wireless/bluez/bluez-5.66-r1.ebuild
23 index 4278549b3ee0..639e234d67c2 100644
24 --- a/net-wireless/bluez/bluez-5.66-r1.ebuild
25 +++ b/net-wireless/bluez/bluez-5.66-r1.ebuild
26 @@ -77,6 +77,10 @@ PATCHES=(
27
28 # Fixed in next release
29 "${FILESDIR}"/${P}-transient-hostname-fix.patch
30 +
31 + # https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a
32 + # https://bugs.gentoo.org/888467
33 + "${FILESDIR}"/${PN}-5.66-musl-max-input.patch
34 )
35
36 pkg_setup() {
37
38 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
39 new file mode 100644
40 index 000000000000..d8bdb3316e49
41 --- /dev/null
42 +++ b/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch
43 @@ -0,0 +1,19 @@
44 +# https://lore.kernel.org/linux-bluetooth/20230131055258.3311810-1-sam@g.o/T/#u
45 +# musl does provide _POSIX_MAX_INPUT, but no MAX_INPUT out of the box.
46 +# This patch assigns _POSIX_MAX_INPUT to MAX_INPUT.
47 +# Please refer: https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a
48 +# https://bugs.gentoo.org/888467
49 +--- a/src/shared/util.c
50 ++++ b/src/shared/util.c
51 +@@ -28,6 +28,11 @@
52 + #include <sys/random.h>
53 + #endif
54 +
55 ++/* define MAX_INPUT for musl */
56 ++#ifndef MAX_INPUT
57 ++#define MAX_INPUT _POSIX_MAX_INPUT
58 ++#endif
59 ++
60 + #include "src/shared/util.h"
61 +
62 + void *util_malloc(size_t size)