iostat: fix build with musl
authorBaruch Siach <baruch@tkos.co.il>
Wed, 30 Sep 2015 17:13:23 +0000 (20:13 +0300)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 30 Sep 2015 20:56:10 +0000 (22:56 +0200)
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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/iostat/iostat.mk

index d28dc1b76e55f995d3f96ae01bdc010a5b0541dc..d591c67dcb367d28d3fd799b2b3f2b1781aa89d7 100644 (file)
@@ -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