From 342400e7c6630c12287fb35e475ea98da4b85eb1 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 30 Apr 2024 11:52:37 +0200 Subject: [PATCH] build: link libatomic if available It'll generally exist but be empty on systems that don't need it. (Some 32bit platforms now need it due to 64bit time_t, and the platform may not have 64bit atomic ops.) Signed-off-by: David Lamparter --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index f11b345cf6..795417cd29 100644 --- a/configure.ac +++ b/configure.ac @@ -1095,6 +1095,8 @@ dnl ------------------------- AC_CHECK_HEADERS([stropts.h sys/ksym.h \ linux/version.h asm/types.h endian.h sys/endian.h]) +AC_CHECK_LIB([atomic], [main], [LIBS="$LIBS -latomic"], [], []) + ac_stdatomic_ok=false AC_DEFINE([FRR_AUTOCONF_ATOMIC], [1], [did autoconf checks for atomic funcs]) AC_CHECK_HEADER([stdatomic.h],[ -- 2.39.5