[Buildroot] [git commit] package/mbpfan: fix musl / uclibc-ng patch
Peter Korsgaard
peter at korsgaard.com
Thu Sep 4 19:52:39 UTC 2025
commit: https://git.buildroot.net/buildroot/commit/?id=717138c83c857d1dd119750f1af6eda033d9206f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Commit 759a08633e ("package/mbpfan: fix build on musl / uclibc-ng") added a
patch for musl / uclibc-ng, but the upstream patch did not correctly apply
to the 2.4.0 release, breaking the build.
Fix that. In the mean time the patch has been applied upstream, so add a
reference to the upstream commit.
Fixes:
https://autobuild.buildroot.net/results/785be6231c1edc4e5461ce083a3d65fd27fc5843/
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
.../0001-Makefile-util.c-fix-build-on-musl-uClibc-ng.patch | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/package/mbpfan/0001-Makefile-util.c-fix-build-on-musl-uClibc-ng.patch b/package/mbpfan/0001-Makefile-util.c-fix-build-on-musl-uClibc-ng.patch
index ac15143e2e..7b42957bdd 100644
--- a/package/mbpfan/0001-Makefile-util.c-fix-build-on-musl-uClibc-ng.patch
+++ b/package/mbpfan/0001-Makefile-util.c-fix-build-on-musl-uClibc-ng.patch
@@ -1,4 +1,4 @@
-From 924e38f159e4f5906f88cd8ddbe27f273c601cb0 Mon Sep 17 00:00:00 2001
+From 2e6ae7ce5c28acaff9b3e77d7a693b7224a46003 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter at korsgaard.com>
Date: Mon, 1 Sep 2025 12:08:53 +0200
Subject: [PATCH] {Makefile,util.c}: fix build on musl / uClibc-ng
@@ -27,6 +27,8 @@ _DEFAULT_SOURCE is:
https://github.com/bminor/glibc/blob/master/include/features.h#L417-L419
Upstream: https://github.com/linux-on-mac/mbpfan/pull/271
+(cherry picked from commit 25c2a09bd0d74e19c3843ce35ac54b5e288480ab)
+[Peter: backport to 2.4.0]
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
Makefile | 2 +-
@@ -34,29 +36,29 @@ Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
-index 94d72ee..ff1b7e6 100644
+index 41873fa..bb6c913 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ BINFLAG = -o
INCLUDES =
LIBS = -lm
LIBPATH =
--CFLAGS += $(COPT) -g $(INCLUDES) -Wall -Wextra -Wno-unused-function -Wno-unused-parameter -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
-+CFLAGS += $(COPT) -g $(INCLUDES) -Wall -Wextra -Wno-unused-function -Wno-unused-parameter -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE
+-CFLAGS += $(COPT) -g $(INCLUDES) -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
++CFLAGS += $(COPT) -g $(INCLUDES) -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE
LDFLAGS += $(LIBPATH) -g
OBJS := $(patsubst %.$(C),%.$(OBJ),$(wildcard $(SOURCE_PATH)*.$(C)))
diff --git a/src/util.c b/src/util.c
-index df5b03f..25415b9 100644
+index c66e6d7..b7fe71e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,6 +1,5 @@
#include <stdarg.h>
#include <stdio.h>
-#define __USE_MISC
- #define _GNU_SOURCE
#include <syslog.h>
+ #include "global.h"
--
2.39.5
More information about the buildroot
mailing list