timespec and libusb again

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

timespec and libusb again

Xiaofan Chen
I am trying to build 1.0.21 release under latest version of MinGW.org
and it seems to failed again because of timespec definition.

This happened before and at that time Keith provided an interim fix which
fix the problem.

Is this the fault with libusb or there is something MinGW.org can help.

Code in question.
https://github.com/libusb/libusb/blob/master/libusb/os/threads_windows.h

// We *were* getting timespec from pthread.h:
#if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
#define HAVE_STRUCT_TIMESPEC 1
#define _TIMESPEC_DEFINED 1
struct timespec {
    long tv_sec;
    long tv_nsec;
};
#endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */


mcuee@Win7HomeX64_PC /h/work/libusb/libusb-1.0.21/build_mingworg
$ make
make  all-recursive
make[1]: Entering directory `/h/work/libusb/libusb-1.0.21/build_mingworg'
Making all in libusb
make[2]: Entering directory `/h/work/libusb/libusb-1.0.21/build_mingworg/libusb'
  CC       libusb_1_0_la-core.lo
In file included from ../../libusb/libusbi.h:248:0,
                 from ../../libusb/core.c:44:
../../libusb/os/threads_windows.h:40:8: error: redefinition of 'struct timespec'
 struct timespec {
        ^
In file included from c:\mingw\include\sys\time.h:3:0,
                 from ../../libusb/core.c:34:
c:\mingw\include\time.h:102:8: note: originally defined here
 struct timespec
        ^
make[2]: *** [libusb_1_0_la-core.lo] Error 1
make[2]: Leaving directory `/h/work/libusb/libusb-1.0.21/build_mingworg/libusb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/h/work/libusb/libusb-1.0.21/build_mingworg'
make: *** [all] Error 2

--
Xiaofan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe