From 26490d547d7f625671b58e0f1e847356971fd057 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 22 Dec 2022 08:46:15 +0100 Subject: [PATCH] Build with -std=gnu99 instead of -std=c99 The latter activates strict POSIX mode with glibc, which disables the declaration of usleep in , leading to an implicit function declaration. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a4edcb..d82568e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ endif() # set some options #set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -g -std=c99 -Wno-unused-result") #set(CMAKE_BUILD_TYPE Debug) -set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -Os -std=c99 -Wno-unused-result") +set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -Os -std=gnu99 -Wno-unused-result") set(CMAKE_BUILD_TYPE Release) set(SRC ${PROJECT_SOURCE_DIR}/src)