From: Richard Kunze Date: Sun, 16 Nov 2014 00:56:12 +0000 (+0100) Subject: hdparm: fix compilation with musl X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=feb67e6b07274f3efe1b17d724fd9a12a323c818;p=openwrt-packages.git hdparm: fix compilation with musl Signed-off-by: Richard Kunze --- diff --git a/utils/hdparm/Makefile b/utils/hdparm/Makefile index 8fb7fae3c..a2988f42e 100644 --- a/utils/hdparm/Makefile +++ b/utils/hdparm/Makefile @@ -19,6 +19,8 @@ PKG_LICENSE:=BSD-Style Open Source License include $(INCLUDE_DIR)/package.mk +TARGET_CFLAGS+=-D_GNU_SOURCE + define Package/hdparm SECTION:=utils CATEGORY:=Utilities diff --git a/utils/hdparm/patches/001-fix-includes.patch b/utils/hdparm/patches/001-fix-includes.patch new file mode 100644 index 000000000..44343fb39 --- /dev/null +++ b/utils/hdparm/patches/001-fix-includes.patch @@ -0,0 +1,20 @@ +--- a/hdparm.h ++++ b/hdparm.h +@@ -2,6 +2,7 @@ + + //#undef __KERNEL_STRICT_NAMES + #include ++#include + + #if !defined(__GNUC__) && !defined(__attribute__) + #define __attribute__(x) +--- a/sysfs.c ++++ b/sysfs.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include