struct timespec defined twice
GCC for 32-bit and 64-bit Windows with a real installer & updater
Brought to you by:
tdragon
struct timespec defined twice:
in (mingw)/include/pthread.h
and in (mingw)/include/parts/time.h
occured in compilation of wxwidgets-3.0.2 with 32bit tdm 5.1.0
solved(?) by adding
ifndef _TIMESPEC_DEFINED/define _TIMESPEC_DEFINED/endif around timespec definition in time.h
as this was done in pthread.h
Anonymous
That is an addition in the new 3.21.1 mingw runtime, would be nice if devs could just stick to one
way of declaring these instead of having several different defines.
Your fix might work for gcc but it breaks other sources so the best fix is to just remove the whole block
in pthread.h and replace it by #include <time.h>. I built gcc-5.3.0 for mingw that way and i have not had any problems with it.
Last edit: ralph engels 2016-02-20