From bf83911631ecfa85f4d85c81d78596b2a823cb44 Mon Sep 17 00:00:00 2001 From: derselbst Date: Mon, 20 Dec 2021 17:40:44 +0100 Subject: [PATCH] Fix Android CI Build by explicitly enabling C language extensions. This will cause the std=gnu90 to be passed via CMAKE_REQUIRED_FLAGS, making clang know about the inline keyword rather than failing when querying for the netinet headers: /usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64//sysroot/usr/include/linux/swab.h:39:8: error: unknown type name 'inline' static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val) { --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4eb837f6..24e39d27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,7 @@ set(CMAKE_C_STANDARD 90) set(CMAKE_CXX_STANDARD 98) # whether to use gnu extensions +set(CMAKE_C_EXTENSIONS ON) set(CMAKE_CXX_EXTENSIONS OFF) # Compile with position independent code if the user requested a shared lib, i.e. no PIC if static requested.