0001-fix-a-build-issue-on-linux.patch 799 B

1234567891011121314151617181920212223242526272829303132
  1. From af07587e8775c25450cda8ba9e9a8b1a58072634 Mon Sep 17 00:00:00 2001
  2. From: Bartosz Golaszewski <brgl@bgdev.pl>
  3. Date: Mon, 3 Jul 2017 15:55:00 +0200
  4. Subject: [PATCH] fix a build issue on linux
  5. On linux PATH_MAX is defined in linux/limits.h. If we include usb.h
  6. without previously having indirectly included it, the build fails.
  7. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
  8. ---
  9. libusb/usb.h | 5 +++++
  10. 1 file changed, 5 insertions(+)
  11. diff --git a/libusb/usb.h b/libusb/usb.h
  12. index d2c30aa..7ad9a66 100644
  13. --- a/libusb/usb.h
  14. +++ b/libusb/usb.h
  15. @@ -41,6 +41,11 @@ typedef unsigned __int32 uint32_t;
  16. #include <stdint.h>
  17. #endif
  18. +/* On linux PATH_MAX is defined in linux/limits.h. */
  19. +#if defined(__linux__)
  20. +#include <linux/limits.h>
  21. +#endif
  22. +
  23. /*
  24. * USB spec information
  25. *
  26. --
  27. 2.9.3