From: Dave Hart Date: Thu, 17 Mar 2011 01:25:14 +0000 (+0000) Subject: [Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile. X-Git-Tag: NTP_4_2_7P140~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb03c784dd9965c12a639529933aafa689d37b8d;p=thirdparty%2Fntp.git [Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile. Add --disable-thread-support to one flock-build variation. One more lock-while-init in lib/isc/task.c to quiet lock analysis. bk: 4d8162fa6fNkiDboogSYFlmTKsKafw --- diff --git a/ChangeLog b/ChangeLog index 17b92fc78..77af45b12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +* [Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile. +* Add --disable-thread-support to one flock-build variation. +* One more lock-while-init in lib/isc/task.c to quiet lock analysis. (4.2.7p139) 2011/03/16 Released by Harlan Stenn * [Bug 1848] make check ntpd --saveconfigquit clutters syslog. (4.2.7p138) 2011/03/08 Released by Harlan Stenn diff --git a/flock-build b/flock-build index 31b69c68e..926225058 100755 --- a/flock-build +++ b/flock-build @@ -82,7 +82,7 @@ do ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" & ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS" & ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto $BUILD_ARGS" & - ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp $BUILD_ARGS" & + ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS" & ;; 1) cat > .flockbuild-$i-$SIG <<-ENDQUOT @@ -115,7 +115,7 @@ do echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 [ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait - ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp $BUILD_ARGS & + ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS & COUNT=\`expr \$COUNT + 1\` echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 diff --git a/lib/isc/task.c b/lib/isc/task.c index 47f978371..73817af90 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -191,6 +191,7 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum, isc_mem_put(manager->mctx, task, sizeof(*task)); return (result); } + LOCK(&manager->lock); LOCK(&task->lock); /* helps coverity analysis noise ratio */ task->manager = manager; task->state = task_state_idle; @@ -205,6 +206,7 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum, INIT_LINK(task, link); INIT_LINK(task, ready_link); UNLOCK(&task->lock); + UNLOCK(&manager->lock); exiting = ISC_FALSE; LOCK(&manager->lock); diff --git a/libntp/msyslog.c b/libntp/msyslog.c index 01c5c4547..10cc3bc8c 100644 --- a/libntp/msyslog.c +++ b/libntp/msyslog.c @@ -431,8 +431,7 @@ change_logfile( * and it's still open, there's nothing to do here. */ if (syslog_file != NULL && syslog_fname != NULL && - (log_fname == syslog_fname || - 0 == strcmp(syslog_fname, log_fname))) + 0 == strcmp(syslog_fname, log_fname)) return 0; if (0 == strcmp(log_fname, "stderr")) { @@ -486,7 +485,9 @@ change_logfile( fileno(syslog_file) != fileno(new_file)) fclose(syslog_file); syslog_file = new_file; - if (log_fname != syslog_abs_fname) { + if (log_fname == syslog_abs_fname) { + free(abs_fname); + } else { if (syslog_abs_fname != NULL && syslog_abs_fname != syslog_fname) free(syslog_abs_fname); diff --git a/libntp/work_fork.c b/libntp/work_fork.c index 44ef043a5..1c852c365 100644 --- a/libntp/work_fork.c +++ b/libntp/work_fork.c @@ -509,8 +509,8 @@ fork_blocking_child( signal_no_reset(SIGPOLL, SIG_DFL); #endif signal_no_reset(SIGHUP, worker_sighup); - init_logging("ntp_intres", 0, NULL, FALSE); - setup_logfile(NULL, NULL); + init_logging("ntp_intres", 0, FALSE); + setup_logfile(NULL); /* * And now back to the portable code