On certain newer versions of visual studio, we have a conflict with pthreads's definition of timespec. Since it is already defined in the windows includes, we have to prevent pthreads from redefining it. To prevent this, the additional mex flag "-DHAVE_STRUCT_TIMESPEC" is required. Problem is, we cannot use this flag for SDKs where it is not.
I'm not sure what combinations of MSVC and windows CRT this occurs on, but it definitely happens on MSVC 2017 community (stock install).
On certain newer versions of visual studio, we have a conflict with pthreads's definition of timespec. Since it is already defined in the windows includes, we have to prevent pthreads from redefining it. To prevent this, the additional mex flag "-DHAVE_STRUCT_TIMESPEC" is required. Problem is, we cannot use this flag for SDKs where it is not.
I'm not sure what combinations of MSVC and windows CRT this occurs on, but it definitely happens on MSVC 2017 community (stock install).