Fix MinGW builds
@@ -60,7 +60,13 @@ include(CPack)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -Wall -pedantic -g -ggdb -DDEBUG=true")
set(CMAKE_C_FLAGS_RELEASE "-O3 -flto -Wall -pedantic -DNDEBUG")
+
+if(MINGW)
+ # https://github.com/PJK/libcbor/issues/13
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+endif()
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-g")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-flto")
