--- a/gnulib-tests/gnulib.mk
+++ b/gnulib-tests/gnulib.mk
@@ -859,7 +859,7 @@
 ## begin gnulib module localcharset-tests
 
 noinst_PROGRAMS += test-localcharset
-test_localcharset_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_localcharset_LDADD = $(LDADD) $(LIB_SETLOCALE) -lwinpthread
 EXTRA_DIST += test-localcharset.c
 
 ## end   gnulib module localcharset-tests
