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) {
This commit is contained in:
derselbst 2021-12-20 17:40:44 +01:00
parent ce6e270a41
commit bf83911631

View file

@ -122,6 +122,7 @@ set(CMAKE_C_STANDARD 90)
set(CMAKE_CXX_STANDARD 98) set(CMAKE_CXX_STANDARD 98)
# whether to use gnu extensions # whether to use gnu extensions
set(CMAKE_C_EXTENSIONS ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
# Compile with position independent code if the user requested a shared lib, i.e. no PIC if static requested. # Compile with position independent code if the user requested a shared lib, i.e. no PIC if static requested.