Commit afd29999 authored by Timo Teräs's avatar Timo Teräs

main/hdparm: fix musl build

parent 1f8969c7
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=hdparm
pkgver=9.43
pkgrel=0
pkgrel=1
pkgdesc="A shell utility for manipulating Linux IDE drive/driver parameters"
url="http://sourceforge.net/projects/hdparm/"
arch="all"
......@@ -9,11 +9,23 @@ license="BSD"
depends=
makedepends=
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
fix-includes.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
make || return 1
}
......@@ -26,4 +38,9 @@ package() {
install -D -m 644 LICENSE.TXT $pkgdir/usr/share/licenses/hdparm/LICENSE.TXT || return 1
}
md5sums="f73233be118d86c779a8463d8b6a3cdb hdparm-9.43.tar.gz"
md5sums="f73233be118d86c779a8463d8b6a3cdb hdparm-9.43.tar.gz
13a99ab348839153ffd0f309981f892b fix-includes.patch"
sha256sums="2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a hdparm-9.43.tar.gz
8234bdc6cda1a81ba404ac2666ba7c0b2c047f13c3face83ee95a5eaa72abe28 fix-includes.patch"
sha512sums="24cf10290d11c611951064ae2f4fc0c06d2aa764eb2801126c0cda272944adc1c07bc905c6c11dd964dd966e213aed1cde06afc7f24c565cfa709ba9134842df hdparm-9.43.tar.gz
8d6268d3183375f5984f9c958f7911dbc501de589a035a6252cfbb5595e5049b567ceaa064ea4644a0d3f9a3381370e1c416c151e34fa19d3df8a09ec12613c0 fix-includes.patch"
--- hdparm-9.43/hdparm.h.orig
+++ hdparm-9.43/hdparm.h
@@ -1,7 +1,7 @@
/* Some prototypes for extern functions. */
//#undef __KERNEL_STRICT_NAMES
-#include <linux/types.h>
+#include <sys/types.h>
#if !defined(__GNUC__) && !defined(__attribute__)
#define __attribute__(x)
--- hdparm-9.43/sysfs.c.orig
+++ hdparm-9.43/sysfs.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
+#include <limits.h>
#include <dirent.h>
#include <sys/stat.h>
#include <linux/types.h>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment