From 040dc9c8af6e4c5b4b22c50c012bdb6507170460 Mon Sep 17 00:00:00 2001 From: Sir Codalot Date: Mon, 17 Feb 2025 21:00:07 +0100 Subject: [PATCH] changed C standard for C compiler The common code of img4dc uses the C function realpath() to canonicalize/cleanup paths. Since -std=c99 was added to CMakeLists.txt, the code couldn't be built on Linux anymore, because realpath() is not part of C99. It is, however, part of the GNU extensions to the C99 standard, so using -std=gnu99 does the trick. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e403aea..43a4ac1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0) project(img4dc) ADD_DEFINITIONS("-Wall -Wpedantic") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") add_subdirectory(common) add_subdirectory(edc)