From: Wouter Wijngaards Date: Tue, 27 Feb 2018 10:36:12 +0000 (+0000) Subject: - Fix compile without threads, and remove unused variable. X-Git-Tag: release-1.7.0rc1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e390bca004892d0141b1cab4cc980574156a524;p=thirdparty%2Funbound.git - Fix compile without threads, and remove unused variable. git-svn-id: file:///svn/unbound/trunk@4553 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 4c569d983..74ae69f62 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 27 February 2018: Wouter - Fixup contrib/fastrpz.patch so that it applies. + - Fix compile without threads, and remove unused variable. 22 February 2018: Ralph - Save wildcard RRset from answer with original owner for use in diff --git a/util/log.c b/util/log.c index 7ac06cdbe..75a58f9de 100644 --- a/util/log.c +++ b/util/log.c @@ -195,7 +195,11 @@ void* log_get_lock(void) { if(!key_created) return NULL; +#ifndef THREADS_DISABLED return (void*)&log_lock; +#else + return NULL; +#endif } void diff --git a/validator/val_neg.c b/validator/val_neg.c index d8e19ee79..541238148 100644 --- a/validator/val_neg.c +++ b/validator/val_neg.c @@ -874,8 +874,7 @@ static uint8_t* reply_nsec_signer(struct reply_info* rep, size_t* signer_len, return 0; } -void val_neg_addreply(struct val_neg_cache* neg, struct reply_info* rep, - uint8_t* qname) +void val_neg_addreply(struct val_neg_cache* neg, struct reply_info* rep) { size_t i, need; struct ub_packed_rrset_key* soa; diff --git a/validator/val_neg.h b/validator/val_neg.h index 1d8128c41..00dad6df1 100644 --- a/validator/val_neg.h +++ b/validator/val_neg.h @@ -198,12 +198,9 @@ int val_neg_zone_compare(const void* a, const void* b); * Insert NSECs from this message into the negative cache for reference. * @param neg: negative cache * @param rep: reply with NSECs. - * @param qname: used to find correct signer, needed when rep does not contain - * a SOA record. * Errors are ignored, means that storage is omitted. */ -void val_neg_addreply(struct val_neg_cache* neg, struct reply_info* rep, - uint8_t* qname); +void val_neg_addreply(struct val_neg_cache* neg, struct reply_info* rep); /** * Insert NSECs from this referral into the negative cache for reference. diff --git a/validator/validator.c b/validator/validator.c index d717c30e7..715ea3171 100644 --- a/validator/validator.c +++ b/validator/validator.c @@ -2189,7 +2189,7 @@ processFinished(struct module_qstate* qstate, struct val_qstate* vq, &qstate->qinfo); if(!qstate->no_cache_store) { val_neg_addreply(qstate->env->neg_cache, - vq->orig_msg->rep, qstate->qinfo.qname); + vq->orig_msg->rep); } } } @@ -3120,7 +3120,7 @@ process_dlv_response(struct module_qstate* qstate, struct val_qstate* vq, return; } /* store NSECs into negative cache */ - val_neg_addreply(ve->neg_cache, msg->rep, NULL); + val_neg_addreply(ve->neg_cache, msg->rep); /* was the lookup a failure? * if we have to go up into the DLV for a higher DLV anchor