diff mbox

iostat: fix build with musl

Message ID 0adb275dfb0b27263aa2a671be7505ca55eb5db8.1443633203.git.baruch@tkos.co.il
State Accepted
Commit bbb793624e264b3f97661cdf15893127aed77653
Headers show

Commit Message

Baruch Siach Sept. 30, 2015, 5:13 p.m. UTC
musl does not provide access to the kernel defined HZ macro. Under Linux HZ is
always 100, so use that value.

Fixes:
http://autobuild.buildroot.net/results/dc9/dc98a572c7055cb66cf14648af750b7e0c8e136e/
http://autobuild.buildroot.net/results/fe3/fe3907858f90f766f1949be631427dbb079e08ed/
http://autobuild.buildroot.net/results/59e/59e7c8a3d94d06ba52ea5034fcabd9737a5314db/

and more.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/iostat/iostat.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Peter Korsgaard Sept. 30, 2015, 8:56 p.m. UTC | #1
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > musl does not provide access to the kernel defined HZ macro. Under Linux HZ is
 > always 100, so use that value.

 > Fixes:
 > http://autobuild.buildroot.net/results/dc9/dc98a572c7055cb66cf14648af750b7e0c8e136e/
 > http://autobuild.buildroot.net/results/fe3/fe3907858f90f766f1949be631427dbb079e08ed/
 > http://autobuild.buildroot.net/results/59e/59e7c8a3d94d06ba52ea5034fcabd9737a5314db/

 > and more.

 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Committed, thanks.
diff mbox

Patch

diff --git a/package/iostat/iostat.mk b/package/iostat/iostat.mk
index d28dc1b76e55..d591c67dcb36 100644
--- a/package/iostat/iostat.mk
+++ b/package/iostat/iostat.mk
@@ -10,7 +10,8 @@  IOSTAT_LICENSE = GPL
 IOSTAT_LICENSE_FILES = LICENSE
 
 define IOSTAT_BUILD_CMDS
-	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
+		CFLAGS="$(TARGET_CFLAGS) -DHZ=100"
 endef
 
 define IOSTAT_INSTALL_TARGET_CMDS