summaryrefslogtreecommitdiffstats
path: root/main/pciutils
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-03-18 16:04:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-03-18 16:04:37 +0000
commit07845401392b9e9daddccc0b4e95258716f0f3f7 (patch)
tree4d55e1df882b7c2835c5d92912fb2c8ad1d8a0cc /main/pciutils
parentc2467b77226da28ad9eebe9863b92f1c9f08b7c7 (diff)
downloadaports-07845401392b9e9daddccc0b4e95258716f0f3f7.tar.bz2
aports-07845401392b9e9daddccc0b4e95258716f0f3f7.tar.xz
main/pciutils: force use of pread by checking for posix version
Diffstat (limited to 'main/pciutils')
-rw-r--r--main/pciutils/APKBUILD12
-rw-r--r--main/pciutils/pread.patch13
2 files changed, 21 insertions, 4 deletions
diff --git a/main/pciutils/APKBUILD b/main/pciutils/APKBUILD
index 521ec7cb9..d8f03eb20 100644
--- a/main/pciutils/APKBUILD
+++ b/main/pciutils/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=pciutils
pkgver=3.3.0
-pkgrel=1
+pkgrel=2
pkgdesc="PCI bus configuration space access library and tools"
url="http://mj.ucw.cz/pciutils.html"
arch="all"
@@ -13,6 +13,7 @@ install=
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="http://www.kernel.org/pub/software/utils/$pkgname/$pkgname-$pkgver.tar.gz
fix-linking-pci-malloc-Makefile.patch
+ pread.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -58,8 +59,11 @@ package() {
}
md5sums="bf6ce5c50b273ffc2d27f659e929a37e pciutils-3.3.0.tar.gz
-f56647a25dd1cfe80f6141914c2c0591 fix-linking-pci-malloc-Makefile.patch"
+f56647a25dd1cfe80f6141914c2c0591 fix-linking-pci-malloc-Makefile.patch
+c6a4ba5d34824a53cb0035bc2d1ca0f8 pread.patch"
sha256sums="d281ceb2e486cf29e527f11ce387597dc0f938a297ea015f62efc1ab66995934 pciutils-3.3.0.tar.gz
-75ff5022e6a223297aa51ffcee80e6fa58bae839d0ae3ae2861013cabce6fba8 fix-linking-pci-malloc-Makefile.patch"
+75ff5022e6a223297aa51ffcee80e6fa58bae839d0ae3ae2861013cabce6fba8 fix-linking-pci-malloc-Makefile.patch
+8ebd84f0d84c3f2935bbe0ed9ec8c186f448803888c3791ca8e4253177c1f7f9 pread.patch"
sha512sums="7505bdb6801710db61b2f987c2dbfaed998aa504c71a30d21b220fe5be4651672e32094c756fb1e79412259ecaf01ea5460dfc6cc67485caa8a794b1d7096a52 pciutils-3.3.0.tar.gz
-520b39602078e4325d7dac2d460547b360f7b52c668d88cf3d776c59246c8cfcb537b7b4f50575da9d2fcea1e207b3e99626ce4f23df890d2565b7dac1db2d94 fix-linking-pci-malloc-Makefile.patch"
+520b39602078e4325d7dac2d460547b360f7b52c668d88cf3d776c59246c8cfcb537b7b4f50575da9d2fcea1e207b3e99626ce4f23df890d2565b7dac1db2d94 fix-linking-pci-malloc-Makefile.patch
+aa1d3272500180256929b39a5fc4ea38ddb6a9fad090d732832ded9cc396303cf56efc91cfdeb76edbcfefc9a7c8eb058562c3c2b09a9090a59d3e68c27cec62 pread.patch"
diff --git a/main/pciutils/pread.patch b/main/pciutils/pread.patch
new file mode 100644
index 000000000..6e0843a6c
--- /dev/null
+++ b/main/pciutils/pread.patch
@@ -0,0 +1,13 @@
+--- ./lib/pread.h.orig
++++ ./lib/pread.h
+@@ -12,8 +12,8 @@
+ * don't define it.
+ */
+
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0
+-/* glibc 2.1 or newer -> pread/pwrite supported automatically */
++#if (defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0) || (_POSIX_VERSION >= 200809L)
++ /* glibc 2.1 or newer or posix 2008 -> pread/pwrite supported automatically */
+
+ #elif defined(i386) && defined(__GLIBC__)
+ /* glibc 2.0 on i386 -> call syscalls directly */