summaryrefslogtreecommitdiff
path: root/net-wireless/bluez/files/bluez-5.66-musl-max-input.patch
blob: d8bdb3316e49134991d4febf308ae55b37b1f9e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)