Bartosz Golaszewski
2017-07-03 14:17:30 UTC
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 <***@bgdev.pl>
---
libusb/usb.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libusb/usb.h b/libusb/usb.h
index fa0e6c6..7823742 100644
--- a/libusb/usb.h
+++ b/libusb/usb.h
@@ -45,6 +45,11 @@ typedef unsigned __int32 uint32_t;
#include <stdint.h>
#endif
+/* On linux PATH_MAX is defined in linux/limits.h. */
+#if defined(__linux__)
+#include <linux/limits.h>
+#endif
+
/*
* USB spec information
*
without previously having indirectly included it, the build fails.
Signed-off-by: Bartosz Golaszewski <***@bgdev.pl>
---
libusb/usb.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libusb/usb.h b/libusb/usb.h
index fa0e6c6..7823742 100644
--- a/libusb/usb.h
+++ b/libusb/usb.h
@@ -45,6 +45,11 @@ typedef unsigned __int32 uint32_t;
#include <stdint.h>
#endif
+/* On linux PATH_MAX is defined in linux/limits.h. */
+#if defined(__linux__)
+#include <linux/limits.h>
+#endif
+
/*
* USB spec information
*
--
2.9.3
2.9.3