* [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng
@ 2025-08-29 16:52 Peter Korsgaard
2025-08-29 21:53 ` Thomas Petazzoni via buildroot
2025-09-11 19:21 ` Thomas Perale via buildroot
0 siblings, 2 replies; 6+ messages in thread
From: Peter Korsgaard @ 2025-08-29 16:52 UTC (permalink / raw)
To: buildroot; +Cc: Christian Stewart
Fixes https://autobuild.buildroot.net/results/9526503fe8e756bd4444f1fb1e9cf1391c461901/
mbpfan uses vsyslog(), which is not in POSIX so only exposed by <syslog.h>
on musl and uclibc-ng if we define _DEFAULT_SOURCE:
https://git.musl-libc.org/cgit/musl/tree/include/syslog.h#n64
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/include/sys/syslog.h#n200
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/mbpfan/mbpfan.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/mbpfan/mbpfan.mk b/package/mbpfan/mbpfan.mk
index 0ac161b327..bccb3ffc16 100644
--- a/package/mbpfan/mbpfan.mk
+++ b/package/mbpfan/mbpfan.mk
@@ -10,7 +10,7 @@ MBPFAN_LICENSE = GPL-3.0+
MBPFAN_LICENSE_FILES = COPYING
define MBPFAN_BUILD_CMDS
- $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS)" \
+ $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -D_DEFAULT_SOURCE" \
LDFLAGS="$(TARGET_LDFLAGS)" \
$(MAKE) CC="$(TARGET_CC)" -C $(@D)
endef
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng
2025-08-29 16:52 [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng Peter Korsgaard
@ 2025-08-29 21:53 ` Thomas Petazzoni via buildroot
2025-08-30 7:44 ` Peter Korsgaard
2025-09-01 10:35 ` Peter Korsgaard
2025-09-11 19:21 ` Thomas Perale via buildroot
1 sibling, 2 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-08-29 21:53 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: buildroot, Christian Stewart
On Fri, 29 Aug 2025 18:52:38 +0200
Peter Korsgaard <peter@korsgaard.com> wrote:
> define MBPFAN_BUILD_CMDS
> - $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS)" \
> + $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -D_DEFAULT_SOURCE" \
Upstream seems to still be active, so what about doing the "right"
thing, which is adding #define _DEFAULT_SOURCE in the source file, and
submitting an upstream patch?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng
2025-08-29 21:53 ` Thomas Petazzoni via buildroot
@ 2025-08-30 7:44 ` Peter Korsgaard
2025-09-01 10:35 ` Peter Korsgaard
1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2025-08-30 7:44 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot, Christian Stewart
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> On Fri, 29 Aug 2025 18:52:38 +0200
> Peter Korsgaard <peter@korsgaard.com> wrote:
>> define MBPFAN_BUILD_CMDS
>> - $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS)" \
>> + $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -D_DEFAULT_SOURCE" \
> Upstream seems to still be active, so what about doing the "right"
> thing, which is adding #define _DEFAULT_SOURCE in the source file, and
> submitting an upstream patch?
OK, I'll take a look.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng
2025-08-29 21:53 ` Thomas Petazzoni via buildroot
2025-08-30 7:44 ` Peter Korsgaard
@ 2025-09-01 10:35 ` Peter Korsgaard
1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2025-09-01 10:35 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot, Christian Stewart
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> On Fri, 29 Aug 2025 18:52:38 +0200
> Peter Korsgaard <peter@korsgaard.com> wrote:
>> define MBPFAN_BUILD_CMDS
>> - $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS)" \
>> + $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -D_DEFAULT_SOURCE" \
> Upstream seems to still be active, so what about doing the "right"
> thing, which is adding #define _DEFAULT_SOURCE in the source file, and
> submitting an upstream patch?
I did that:
https://github.com/linux-on-mac/mbpfan/pull/271
And committed this patch after updating it to use the patch.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng
2025-08-29 16:52 [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng Peter Korsgaard
2025-08-29 21:53 ` Thomas Petazzoni via buildroot
@ 2025-09-11 19:21 ` Thomas Perale via buildroot
2025-09-11 21:45 ` Peter Korsgaard
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Perale via buildroot @ 2025-09-11 19:21 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: Thomas Perale, buildroot
In reply of:
> Fixes https://autobuild.buildroot.net/results/9526503fe8e756bd4444f1fb1e9cf1391c461901/
>
> mbpfan uses vsyslog(), which is not in POSIX so only exposed by <syslog.h>
> on musl and uclibc-ng if we define _DEFAULT_SOURCE:
>
> https://git.musl-libc.org/cgit/musl/tree/include/syslog.h#n64
> https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/include/sys/syslog.h#n200
>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Applied to 2025.02.x & 2025.05.x. Thanks
> ---
> package/mbpfan/mbpfan.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/mbpfan/mbpfan.mk b/package/mbpfan/mbpfan.mk
> index 0ac161b327..bccb3ffc16 100644
> --- a/package/mbpfan/mbpfan.mk
> +++ b/package/mbpfan/mbpfan.mk
> @@ -10,7 +10,7 @@ MBPFAN_LICENSE = GPL-3.0+
> MBPFAN_LICENSE_FILES = COPYING
>
> define MBPFAN_BUILD_CMDS
> - $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS)" \
> + $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -D_DEFAULT_SOURCE" \
> LDFLAGS="$(TARGET_LDFLAGS)" \
> $(MAKE) CC="$(TARGET_CC)" -C $(@D)
> endef
> --
> 2.39.5
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-11 21:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 16:52 [Buildroot] [PATCH] package/mbpfan: fix build on musl / uclibc-ng Peter Korsgaard
2025-08-29 21:53 ` Thomas Petazzoni via buildroot
2025-08-30 7:44 ` Peter Korsgaard
2025-09-01 10:35 ` Peter Korsgaard
2025-09-11 19:21 ` Thomas Perale via buildroot
2025-09-11 21:45 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox