aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/libusbx/APKBUILD21
-rw-r--r--main/libusbx/define-timespec-to-timeinterval.patch17
2 files changed, 34 insertions, 4 deletions
diff --git a/main/libusbx/APKBUILD b/main/libusbx/APKBUILD
index f6d121c363..4209c83e73 100644
--- a/main/libusbx/APKBUILD
+++ b/main/libusbx/APKBUILD
@@ -10,9 +10,19 @@ license="LGPL2+"
subpackages="$pkgname-dev"
replaces="libusb"
makedepends=""
-source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
+ define-timespec-to-timeinterval.patch"
_builddir="$srcdir"/$pkgname-$_ver
+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"
./configure \
@@ -29,6 +39,9 @@ package() {
make DESTDIR="$pkgdir" install || return 1
rm "$pkgdir"/usr/lib/*.la || return 1
}
-md5sums="99467ca2cb81c19c4a172de9f30e7576 libusbx-1.0.17.tar.bz2"
-sha256sums="876f8d2c3fee73840a89cb78f3e384c0ab73a67f9155a010b1a5a73ece5145b8 libusbx-1.0.17.tar.bz2"
-sha512sums="fddde538197707e6a97a6ddefab0deeba67f93def1694dac8379589d442c707f8319b1bd9fae6587b25ddaa92ce7894f3ec2e65ddfc031697c15e4c65d251d31 libusbx-1.0.17.tar.bz2"
+md5sums="99467ca2cb81c19c4a172de9f30e7576 libusbx-1.0.17.tar.bz2
+85eb3fbcfc984a037570cb2373c214fc define-timespec-to-timeinterval.patch"
+sha256sums="876f8d2c3fee73840a89cb78f3e384c0ab73a67f9155a010b1a5a73ece5145b8 libusbx-1.0.17.tar.bz2
+257f0f7a1a0eb6cbc9c1788e548b8cd0981e4f1ea2da9ac2724055afb03f41fc define-timespec-to-timeinterval.patch"
+sha512sums="fddde538197707e6a97a6ddefab0deeba67f93def1694dac8379589d442c707f8319b1bd9fae6587b25ddaa92ce7894f3ec2e65ddfc031697c15e4c65d251d31 libusbx-1.0.17.tar.bz2
+6d033c2b4d8369c5997596c90762e3a160f4da93fc5cece237316cd47dbc5f801c4002d99fd44e53747495140dbae62962ef935c4968d6b8922805e1cc00843c define-timespec-to-timeinterval.patch"
diff --git a/main/libusbx/define-timespec-to-timeinterval.patch b/main/libusbx/define-timespec-to-timeinterval.patch
new file mode 100644
index 0000000000..3a276bc4c9
--- /dev/null
+++ b/main/libusbx/define-timespec-to-timeinterval.patch
@@ -0,0 +1,17 @@
+--- libusbx-1.0.17.orig/libusb/io.c
++++ libusbx-1.0.17/libusb/io.c
+@@ -38,6 +38,14 @@
+ #include "libusbi.h"
+ #include "hotplug.h"
+
++#ifndef TIMESPEC_TO_TIMEVAL
++#define TIMESPEC_TO_TIMEVAL(tv, ts) \
++ do { \
++ (tv)->tv_sec = (ts)->tv_sec; \
++ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
++ } while (0)
++#endif
++
+ /**
+ * \page io Synchronous and asynchronous device I/O
+ *