Addendum: Incremental patch so we only include '-pthread' once in the
compilation flags.

Regards,
Stefan

diff --git a/configure b/configure
index 565b888..49ba7bc 100755
--- a/configure
+++ b/configure
@@ -227,6 +227,7 @@ feat_timestamping=1
 try_timestamping=0
 feat_ntp_signd=0
 ntp_era_split=""
+use_pthread=0
 default_user="root"
 default_hwclockfile=""
 default_pidfile="/var/run/chrony/chronyd.pid"
@@ -652,7 +653,7 @@ then
   add_def FEAT_ASYNCDNS
   add_def USE_PTHREAD_ASYNCDNS
   EXTRA_OBJECTS="$EXTRA_OBJECTS nameserv_async.o"
-  MYCFLAGS="$MYCFLAGS -pthread"
+  use_pthread=1
 fi

 if test_code 'arc4random_buf()' 'stdlib.h' '' ''
'arc4random_buf(NULL, 0);'; then
@@ -793,7 +794,7 @@ if [ $try_setsched = "1" ] && \
      pthread_setschedparam(pthread_self(), SCHED_FIFO, &sched);'
 then
   add_def HAVE_PTHREAD_SETSCHEDPARAM
-  MYCFLAGS="$MYCFLAGS -pthread"
+  use_pthread=1
 fi

 if [ $try_lockmem = "1" ] && \
@@ -897,6 +898,10 @@ if [ $feat_sechash = "1" ] && [ "x$HASH_LINK" =
"x" ] && [ $try_tomcrypt = "1" ]
   fi
 fi

+if [ $use_pthread = "1" ]; then
+  MYCFLAGS="$MYCFLAGS -pthread"
+fi
+
 SYSCONFDIR=/etc
 if [ "x$SETSYSCONFDIR" != "x" ]; then
   SYSCONFDIR=$SETSYSCONFDIR

-- 
To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" 
in the subject.
For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the 
subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.

Reply via email to