- workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280210 - code uses the c11 feature stdatomic.h while it uses --std=c99 - add FreeBSD TUN support: include src/tun_freebsd.c in the platform build --- meson.build.orig 2026-07-30 03:39:06 UTC +++ meson.build @@ -5,7 +5,7 @@ project('libRIST', 'c', project('libRIST', 'c', version: '0.2.20', - default_options: ['c_std=c99', 'warning_level=3', 'libdir=lib'], + default_options: ['c_std=c11', 'warning_level=3', 'libdir=lib'], meson_version: '>= 0.51.0') cc = meson.get_compiler('c') @@ -158,6 +158,8 @@ void test(void) { platform_files += 'src/tun_darwin.c' test_args += '-D_DARWIN_C_SOURCE' add_project_arguments('-D_DARWIN_C_SOURCE', language: 'c') + elif host_machine.system() == 'freebsd' + platform_files += 'src/tun_freebsd.c' elif host_machine.system() == 'gnu' test_args += '-D_GNU_SOURCE' add_project_arguments('-D_GNU_SOURCE', language: 'c') @@ -426,7 +428,7 @@ if get_option('static_analyze') if get_option('static_analyze') run_target('cppcheck', command : ['cppcheck', '--quiet', - '--std=c99', + '--std=c11', '--suppressions-list=' + join_paths(librist_src_root, 'common/configs/cppcheck-suppressions.txt'), '--project=' + join_paths(meson.build_root(), 'compile_commands.json')])