diff --git a/c3s/configure b/c3s/configure
index 4478b88..e9f94bb 100755
--- a/c3s/configure
+++ b/c3s/configure
@@ -51,7 +51,7 @@ LIBS="${LIBS:=-lm}"
# Common config for all targets
CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
CPPFLAGS="$CPPFLAGS -I../libffi/include"
-LIBS="$LIBS ../libffi/.libs/libffi.a"
+LIBS="$LIBS ../libffi/.libs/libffi.la -pthread"
config_asan
config_gnu
pkg_config libbsd-overlay
diff --git a/test/configure b/test/configure
index 941d794..b8f3eed 100755
--- a/test/configure
+++ b/test/configure
@@ -51,7 +51,7 @@ LIBS="${LIBS:=} -lm"
# Common config for all targets
CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
CPPFLAGS="$CPPFLAGS -I../libffi/include"
-LIBS="$LIBS ../libffi/libffi.la"
+LIBS="$LIBS ../libffi/libffi.la -pthread"
config_asan
config_gnu
pkg_config libbsd-overlay