[flashrom] [PATCH 3/3] Properly include libusb-win32 header.
c-d.hailfinger.devel.2006 at gmx.net
Mon Jan 26 10:00:17 CET 2015
On 26.01.2015 09:35, Stefan Tauner wrote:
> On Mon, 26 Jan 2015 02:54:35 +0100
> Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:
>> On 19.01.2015 21:39, Stefan Tauner wrote:
>>> libusb-win32 is using a different header file name for a while, use
>>> that on Windows builds to make clear that this is currently the
>>> correct header to include.
>> Yes, but at http://flashrom.org/Windows we still direct users to the old
>> libusb-win32 version which uses the old usb.h.
>> As long as those instructions are in the wiki, this will introduce
>> additional breakage.
> That's because that wiki page is even more outdated than libusb-0. :)
>>> Hopefully this will change soonish with migrating away from libusb-0.
>>> Signed-off-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
>>> Acked-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
>>> Makefile | 5 +++++
>>> dediprog.c | 8 ++++++++
>>> 2 files changed, 13 insertions(+)
>>> diff --git a/Makefile b/Makefile
>>> index 54ebfe4..03670d2 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -843,7 +843,12 @@ endef
>>> export LIBPCI_TEST
>>> define LIBUSB0_TEST
>>> +#include "platform.h"
>>> +#if IS_WINDOWS
>>> +#include <lusb0_usb.h>
>>> #include <usb.h>
>>> int main(int argc, char **argv)
>>> (void) argc;
>> We'd have to fix the wiki at the same time we commit this.
> The more important question is if it is worth it at all. Under normal
> circumstances I'd say no, because we should migrate to libusb-1 ASAP.
> In retrospection of our past development I would that say fixing things
> that are wrong but easy to fix should be done (immediately), even if
> they are obsoleted soon in the best case.
> Is it enough to change the download URL for the precompiled libusb and
> change the name of usb.h in the description or were there other
> build-relevant changes between 184.108.40.206 and 220.127.116.11?
I tried building natively with libusb-win32 18.104.22.168 and it worked with
your patch. Please adjust both (bin and devel-filter) libusb-win32
version numbers while you're at it.
More information about the flashrom