Last-Update: 2014-03-07
Subject: link daemon with -pthread
From: Michael Tokarev <mjt@tls.msk.ru>
Forwarded: needs-forwaring

automountd uses pthread functions but does not link
with -lpthread.  This worked because other libraries
it links with indirectly uses -lpthread too, but this
breaks with -Wl,--no-as-needed or with gold instead of ld.

--- a/daemon/Makefile
+++ b/daemon/Makefile
@@ -19,9 +19,9 @@
 CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfifodir)\"
 CFLAGS += -DAUTOFS_FLAG_DIR=\"$(autofsflagdir)\"
 CFLAGS += -DVERSION_STRING=\"$(version)\"
 LDFLAGS += -rdynamic
-LIBS += -ldl
+LIBS += -ldl -lpthread
 
 ifeq ($(LDAP), 1)
     CFLAGS += $(XML_FLAGS)
     LIBS += $(XML_LIBS)
