From 9a5d2c0ff64b016b8e957a9502d0cb1264e17d46 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 3 May 2020 23:01:18 +0200 Subject: [PATCH] - libusb-compat: add patch from buildroot --- make/target-libs.mk | 3 ++ .../0001-fix-a-build-issue-on-linux.patch | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 patches/libusb-compat/0001-fix-a-build-issue-on-linux.patch diff --git a/make/target-libs.mk b/make/target-libs.mk index 9646d405..1308abe2 100644 --- a/make/target-libs.mk +++ b/make/target-libs.mk @@ -487,12 +487,15 @@ LIBUSB-COMPAT_URL = https://github.com/libusb/libusb-compat-0.1/releases/down $(ARCHIVE)/$(LIBUSB-COMPAT_SOURCE): $(DOWNLOAD) $(LIBUSB-COMPAT_URL)/$(LIBUSB-COMPAT_SOURCE) +LIBUSB-COMPAT_PATCH = 0001-fix-a-build-issue-on-linux.patch + LUBUSB-COMPAT_DEPS = libusb libusb-compat: $(LUBUSB-COMPAT_DEPS) $(ARCHIVE)/$(LIBUSB-COMPAT_SOURCE) | $(TARGET_DIR) $(REMOVE)/$(LIBUSB-COMPAT_TMP) $(UNTAR)/$(LIBUSB-COMPAT_SOURCE) $(CHDIR)/$(LIBUSB-COMPAT_TMP); \ + $(call apply_patches, $(addprefix $(@F)/,$(LIBUSB-COMPAT_PATCH))); \ $(CONFIGURE) \ --prefix= \ ; \ diff --git a/patches/libusb-compat/0001-fix-a-build-issue-on-linux.patch b/patches/libusb-compat/0001-fix-a-build-issue-on-linux.patch new file mode 100644 index 00000000..d2e26b32 --- /dev/null +++ b/patches/libusb-compat/0001-fix-a-build-issue-on-linux.patch @@ -0,0 +1,32 @@ +From af07587e8775c25450cda8ba9e9a8b1a58072634 Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski +Date: Mon, 3 Jul 2017 15:55:00 +0200 +Subject: [PATCH] fix a build issue on linux + +On linux PATH_MAX is defined in linux/limits.h. If we include usb.h +without previously having indirectly included it, the build fails. + +Signed-off-by: Bartosz Golaszewski +--- + libusb/usb.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libusb/usb.h b/libusb/usb.h +index d2c30aa..7ad9a66 100644 +--- a/libusb/usb.h ++++ b/libusb/usb.h +@@ -41,6 +41,11 @@ typedef unsigned __int32 uint32_t; + #include + #endif + ++/* On linux PATH_MAX is defined in linux/limits.h. */ ++#if defined(__linux__) ++#include ++#endif ++ + /* + * USB spec information + * +-- +2.9.3 +