-
Notifications
You must be signed in to change notification settings - Fork 174
#if defined(_MSC_VER)
is not sufficient to detect "building for Windows"
#187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Patching in a
|
That define is not for detecting windows but the compiler. The mingw tool chain for example is also windows, but it does provide clock_gettime. What does the Zig compiler target? |
ah, I see - Zig targets mingw-w64 by default (or when using a triple like x86_64-windows-gnu, ziglang/zig#8878). It appears the actual availability of |
We do define _GNU_SOURCE which I think should do it? |
After further investigation this seems to be a shortcoming of the Zig toolchain itself, which ships a stub header for MinGW's https://github.com/ziglang/zig/blob/master/lib/libc/include/any-windows-any/pthread_time.h I worked around that using https://github.com/kassane/winpthreads-zigbuild. Sorry for the noise :) |
No worries, glad you sorted it out! |
This breaks when using the Zig toolchain to (cross-)compile for Windows, for instance.
The text was updated successfully, but these errors were encountered: