Explorar o código

fix musl compile, update to latest upstream

Waldemar Brodkorb %!s(int64=11) %!d(string=hai) anos
pai
achega
d27a4a6810

+ 3 - 3
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/}
 

+ 0 - 36
package/hdparm/patches/patch-Makefile

@@ -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

+ 11 - 0
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);

+ 10 - 0
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)

+ 14 - 0
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"