On Tue, Oct 16, 2012 at 09:57:16AM +0800, Xiaofan Chen wrote: > Hi Greg, > > Sorry the previous email goes to the wrong linux kernel list. > > Now usbutils git almost builds successfully out of the box under > Mac OS Xand Cygwin (using libusbx). Just wondering if you can > accept the minor fix for Mac OS X and suggest a way to fix > cygwin build. > > For Cygwin, there is a conflict with Cygwin's w32api package. > > DATADIR conflicts with MinGW and cydwin's <objidl.h> in their > w32api package. > http://caca.zoy.org/changeset/3404 > > typedef enum tag DATADIR { > DATADIR_GET=1, > DATADIR_SET > } DATADIR; > > I do not know the proper fix, so I just temporarily change > objidl.h to > > typedef enum tag DATADIR { > DATADIR_GET=1, > DATADIR_SET > } DATADIR1; > > After that I can build usbutils. Might it just be easier to patch usbutils to be something like USB_IDS_DATADIR instead when building on these systems? > I only need one fix for Mac OS X as Apple's gcc compiler does > not like --as-needed. I didn't think Apple used gcc anymore. How about testing to see if this is a valid option before trying to use it instead of just removing it? > > mymacmini:usbutils xiaofanc$ git diff > diff --git a/Makefile.am b/Makefile.am > index 4e53e45..e8cb002 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -1,8 +1,7 @@ > SUBDIRS = \ > usbhid-dump > > -AM_LDFLAGS = \ > - -Wl,--as-needed You also just dropped -Wl, any reason why? greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html