summaryrefslogtreecommitdiff
path: root/package/hdparm
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-12-26 10:26:20 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2013-12-26 10:26:20 +0100
commitd27a4a6810aee189423ea22692ab76c0f7b75bc2 (patch)
treed7864955cd41e4c2686b9c7b036dad9d56a43da3 /package/hdparm
parentda3fa3594adb8ac87d60807e02693121e232910b (diff)
fix musl compile, update to latest upstream
Diffstat (limited to 'package/hdparm')
-rw-r--r--package/hdparm/Makefile6
-rw-r--r--package/hdparm/patches/patch-Makefile36
-rw-r--r--package/hdparm/patches/patch-fallocate_c11
-rw-r--r--package/hdparm/patches/patch-hdparm_h10
-rw-r--r--package/hdparm/patches/patch-sysfs_c14
5 files changed, 38 insertions, 39 deletions
diff --git a/package/hdparm/Makefile b/package/hdparm/Makefile
index 85b49f5a0..61925e59c 100644
--- a/package/hdparm/Makefile
+++ b/package/hdparm/Makefile
@@ -4,11 +4,11 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= hdparm
-PKG_VERSION:= 9.15
+PKG_VERSION:= 9.43
PKG_RELEASE:= 1
-PKG_MD5SUM:= 0524dd10ad986285ff4eeb3507f7471c
+PKG_MD5SUM:= f73233be118d86c779a8463d8b6a3cdb
PKG_DESCR:= get/set ATA drive parameters
-PKG_SECTION:= utils
+PKG_SECTION:= fs
PKG_URL:= http://sourceforge.net/projects/hdparm
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=hdparm/}
diff --git a/package/hdparm/patches/patch-Makefile b/package/hdparm/patches/patch-Makefile
deleted file mode 100644
index 616b9fccc..000000000
--- a/package/hdparm/patches/patch-Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
---- hdparm-9.15.orig/Makefile 2008-12-10 01:14:28.000000000 +0100
-+++ hdparm-9.15/Makefile 2011-01-15 20:46:42.000000000 +0100
-@@ -13,10 +13,10 @@ oldmandir = $(manprefix)/man
- CC ?= gcc
- STRIP ?= strip
-
--CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
-+CFLAGS ?= -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
-
- #LDFLAGS = -s -static
--LDFLAGS = -s
-+LDFLAGS ?= -s
- INSTALL = install
- INSTALL_DATA = $(INSTALL) -m 644
- INSTALL_DIR = $(INSTALL) -m 755 -d
-@@ -28,7 +28,6 @@ all: hdparm
-
- hdparm: hdparm.h sgio.h $(OBJS)
- $(CC) $(LDFLAGS) -o hdparm $(OBJS)
-- $(STRIP) hdparm
-
- hdparm.o: hdparm.h sgio.h
-
-@@ -46,9 +45,9 @@ install: all hdparm.8
- if [ -f $(DESTDIR)$(sbindir)/hdparm ]; then rm -f $(DESTDIR)$(sbindir)/hdparm ; fi
- if [ -f $(DESTDIR)$(mandir)/man8/hdparm.8 ]; then rm -f $(DESTDIR)$(mandir)/man8/hdparm.8 ;\
- elif [ -f $(DESTDIR)$(oldmandir)/man8/hdparm.8 ]; then rm -f $(DESTDIR)$(oldmandir)/man8/hdparm.8 ; fi
-- $(INSTALL_PROGRAM) -D hdparm $(DESTDIR)$(sbindir)/hdparm
-- if [ -d $(DESTDIR)$(mandir) ]; then $(INSTALL_DATA) -D hdparm.8 $(DESTDIR)$(mandir)/man8/hdparm.8 ;\
-- elif [ -d $(DESTDIR)$(oldmandir) ]; then $(INSTALL_DATA) -D hdparm.8 $(DESTDIR)$(oldmandir)/man8/hdparm.8 ; fi
-+ $(INSTALL_PROGRAM) hdparm $(DESTDIR)$(sbindir)/hdparm
-+ if [ -d $(DESTDIR)$(mandir) ]; then $(INSTALL_DATA) hdparm.8 $(DESTDIR)$(mandir)/man8/hdparm.8 ;\
-+ elif [ -d $(DESTDIR)$(oldmandir) ]; then $(INSTALL_DATA) hdparm.8 $(DESTDIR)$(oldmandir)/man8/hdparm.8 ; fi
-
- clean:
- -rm -f hdparm $(OBJS) core 2>/dev/null
diff --git a/package/hdparm/patches/patch-fallocate_c b/package/hdparm/patches/patch-fallocate_c
new file mode 100644
index 000000000..b826cdeba
--- /dev/null
+++ b/package/hdparm/patches/patch-fallocate_c
@@ -0,0 +1,11 @@
+--- hdparm-9.43.orig/fallocate.c 2010-10-04 21:38:39.000000000 +0200
++++ hdparm-9.43/fallocate.c 2013-12-26 10:25:40.000000000 +0100
+@@ -27,7 +27,7 @@ int do_fallocate_syscall (const char *pa
+ err = EINVAL;
+ #else
+ int fd;
+- loff_t offset = 0, len;
++ off_t offset = 0, len;
+ int mode = 0;
+
+ fd = open(path, O_WRONLY|O_CREAT|O_EXCL, 0600);
diff --git a/package/hdparm/patches/patch-hdparm_h b/package/hdparm/patches/patch-hdparm_h
new file mode 100644
index 000000000..8149ef69c
--- /dev/null
+++ b/package/hdparm/patches/patch-hdparm_h
@@ -0,0 +1,10 @@
+--- hdparm-9.43.orig/hdparm.h 2012-01-06 17:38:59.000000000 +0100
++++ hdparm-9.43/hdparm.h 2013-12-26 10:25:23.000000000 +0100
+@@ -2,6 +2,7 @@
+
+ //#undef __KERNEL_STRICT_NAMES
+ #include <linux/types.h>
++#include <sys/types.h>
+
+ #if !defined(__GNUC__) && !defined(__attribute__)
+ #define __attribute__(x)
diff --git a/package/hdparm/patches/patch-sysfs_c b/package/hdparm/patches/patch-sysfs_c
new file mode 100644
index 000000000..b3ffc3191
--- /dev/null
+++ b/package/hdparm/patches/patch-sysfs_c
@@ -0,0 +1,14 @@
+--- hdparm-9.43.orig/sysfs.c 2010-10-04 21:39:20.000000000 +0200
++++ hdparm-9.43/sysfs.c 2013-12-26 10:24:57.000000000 +0100
+@@ -11,9 +11,11 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <fcntl.h>
++#include <limits.h>
+ #include <errno.h>
+ #include <dirent.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
+ #include <linux/types.h>
+
+ #include "hdparm.h"