pkg-config --cflags libusb-1.0 should ensure <libusb.h> would be found.
Command's output is used to compile omap3-usb-loader.c, but because the
file does #include <libusb-1.0/libusb.h>, it will probably not find the
header in the directory added to search path by pkg-config and depend on
other directories in the search path. Fix this. We already expect users
to have proper pkg-config files, so linking works, so it's not too much
to ask to expect the pkg-config file that should already exist to yield
proper --cflags as well.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
v1 -> v2:
  - new alternate commit after Trent's feedback
---
 scripts/omap3-usb-loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/omap3-usb-loader.c b/scripts/omap3-usb-loader.c
index 599a93856ac3..0f352c8453fc 100644
--- a/scripts/omap3-usb-loader.c
+++ b/scripts/omap3-usb-loader.c
@@ -28,7 +28,7 @@
 #include <errno.h>
 #include <libgen.h>            /* for basename */
 
-#include <libusb-1.0/libusb.h>         /* the main event */
+#include <libusb.h>            /* the main event */
 
 /* Device specific defines (OMAP)
  * Primary source: http://www.ti.com/lit/pdf/sprugn4
-- 
2.30.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to