define _POSIX_C_SOURCE=1 on windows
Fixes "undefined reference to `localtime_r`" in, e.g., Vala's GLib.Time.local when building on mingw-w64.
This commit is contained in:
parent
733d612b18
commit
43fd04ce41
|
@ -179,6 +179,7 @@ if (NOT NO_DEBUG)
|
||||||
endif (NOT NO_DEBUG)
|
endif (NOT NO_DEBUG)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=1")
|
||||||
set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --define=_WIN32")
|
set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --define=_WIN32")
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue