mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: ejo@pengutronix.de, Trent Piepho <trent.piepho@igorinstitute.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 3/4] scripts: omap3-usb-loader: make proper use of pkg-config --cflags
Date: Fri, 17 Sep 2021 19:41:26 +0200	[thread overview]
Message-ID: <20210917174127.23345-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210917174127.23345-1-a.fatoum@pengutronix.de>

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 <a.fatoum@pengutronix.de>
---
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2021-09-17 17:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 17:41 [PATCH v2 1/4] common: remove !SANDBOX dependency for target tools Ahmad Fatoum
2021-09-17 17:41 ` [PATCH v2 2/4] common: add new menu " Ahmad Fatoum
2021-09-17 17:41 ` Ahmad Fatoum [this message]
2021-09-17 17:41 ` [PATCH v2 4/4] scripts: allow building USB loader tools for target as well Ahmad Fatoum
2021-10-02  9:13 ` [PATCH v2 1/4] common: remove !SANDBOX dependency for target tools Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210917174127.23345-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ejo@pengutronix.de \
    --cc=trent.piepho@igorinstitute.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox