]> code.ossystems Code Review - openembedded-core.git/commitdiff
libusb-compat: Include sys/types.h in usb.h
authorKhem Raj <raj.khem@gmail.com>
Mon, 6 Apr 2015 17:36:40 +0000 (17:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Apr 2015 18:48:03 +0000 (19:48 +0100)
Fixes compile errors when usb.h is included in
other packages, it expects sys/types.h to be
there, instead it should include it itself

Change-Id: Ib49477b7d3f3cd97d65c9578bdc33f2ee33f5a26
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch [new file with mode: 0644]
meta/recipes-support/libusb/libusb-compat_0.1.5.bb

diff --git a/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch b/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
new file mode 100644 (file)
index 0000000..b88440d
--- /dev/null
@@ -0,0 +1,30 @@
+From 340f911f9e3f4ff6b01682c5341c959060782af2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Apr 2015 19:18:45 -0700
+Subject: [PATCH] usb.h: Include sys/types.h
+
+We need the definitions for things like u_intX_t
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libusb/usb.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libusb/usb.h b/libusb/usb.h
+index 84e730f..caffae2 100644
+--- a/libusb/usb.h
++++ b/libusb/usb.h
+@@ -31,6 +31,8 @@
+ #include <dirent.h>
++#include <sys/types.h>
++
+ /*
+  * USB spec information
+  *
+-- 
+2.1.4
+
index 74761d6a4428e75f5230035eaee19ee98e24b3e4..646872cb961fa4bde53cd654b4fe2ac5f7ae398f 100644 (file)
@@ -18,7 +18,9 @@ BBCLASSEXTEND = "native nativesdk"
 
 PE = "1"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2 \
+           file://0001-usb.h-Include-sys-types.h.patch \
+          "
 
 SRC_URI[md5sum] = "2780b6a758a1e2c2943bdbf7faf740e4"
 SRC_URI[sha256sum] = "404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a"