All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/bluez5_utils: Fix builds with musl-libc
@ 2023-03-26 13:09 Florian Fainelli
  2023-03-28 20:25 ` Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: Florian Fainelli @ 2023-03-26 13:09 UTC (permalink / raw)
  To: buildroot
  Cc: Florian Fainelli, marcin, d.lang, Thomas Petazzoni, Yann E. MORIN

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 <f.fainelli@gmail.com>
---
 .../bluez5_utils/0001-musl-max-input.patch    | 35 +++++++++++++++++++
 1 file changed, 35 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 000000000000..87fbb68f8f40
--- /dev/null
+++ b/package/bluez5_utils/0001-musl-max-input.patch
@@ -0,0 +1,35 @@
+From ca6546fe521360fcf905bc115b893f322e706cb2 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+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
+---
+ 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 <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)
+-- 
+cgit 
+
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-31  7:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-26 13:09 [Buildroot] [PATCH] package/bluez5_utils: Fix builds with musl-libc Florian Fainelli
2023-03-28 20:25 ` Yann E. MORIN
2023-03-29  8:44   ` [Buildroot] Indicating upstream status [was: [PATCH] package/bluez5_utils: Fix builds with musl-libc] Arnout Vandecappelle
2023-03-29  8:50     ` Thomas Petazzoni via buildroot
2023-03-29  9:06       ` Arnout Vandecappelle
2023-03-29  9:28         ` Thomas Petazzoni via buildroot
2023-03-29 12:39           ` Florian Fainelli
2023-03-30  7:03             ` Arnout Vandecappelle
2023-03-30 12:21               ` Thomas Petazzoni via buildroot
2023-03-30 12:33                 ` Arnout Vandecappelle
2023-03-31  7:28                   ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.