]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile.
authorDave Hart <hart@ntp.org>
Thu, 17 Mar 2011 01:25:14 +0000 (01:25 +0000)
committerDave Hart <hart@ntp.org>
Thu, 17 Mar 2011 01:25:14 +0000 (01:25 +0000)
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

ChangeLog
flock-build
lib/isc/task.c
libntp/msyslog.c
libntp/work_fork.c

index 17b92fc78ce8cce452a41c4c14f4cfa9f6d2d6f8..77af45b12e2f484999631e095018732a7b331be4 100644 (file)
--- 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 <stenn@ntp.org>
 * [Bug 1848] make check ntpd --saveconfigquit clutters syslog.
 (4.2.7p138) 2011/03/08 Released by Harlan Stenn <stenn@ntp.org>
index 31b69c68e0aa4443479ce209754a72e677577cc6..9262250581fec865e2103a8f8e311a9887d14f20 100755 (executable)
@@ -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
index 47f978371d52e23e44089004f2c9109428c21b2a..73817af90cf5c5b47c8aa13dab257ac4bc71a224 100644 (file)
@@ -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);
index 01c5c45477c7edd45e1c107e8112c3268f407978..10cc3bc8c873623c6f990f7b9a4c4dd0623f7329 100644 (file)
@@ -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);
index 44ef043a5f4fa8a2d554cf8c93fa6f587cbca8c2..1c852c3659bcc1ad7e7e20002697eeb9be173cd4 100644 (file)
@@ -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