From: Mark Andrews Date: Thu, 9 Jul 2020 04:49:47 +0000 (+1000) Subject: Handle namespace clash over 'SEC' on illumos. X-Git-Tag: v9.17.4~50^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=18eef2024187bd0c7fcb95bcec14b068a564b1c1;p=thirdparty%2Fbind9.git Handle namespace clash over 'SEC' on illumos. --- diff --git a/CHANGES b/CHANGES index 52eaf73dc23..ade4b3ca76d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5469. [port] illumos: SEC is defined in which + conflicted with our use of SEC. [GL #1993] + 5468. [bug] Address potential double unlock in process_fd(). [GL #2005] diff --git a/lib/bind9/check.c b/lib/bind9/check.c index 1b1ae19ecb0..45696b54cae 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -1592,7 +1592,8 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx, obj = NULL; } if (obj != NULL) { - enum { MAS = 1, PRI = 2, SLA = 4, SEC = 8 } values = 0; + /* Note: SEC is defined in on some platforms. */ + enum { MAS = 1, PRI = 2, SLA = 4, SCN = 8 } values = 0; for (const cfg_listelt_t *el = cfg_list_first(obj); el != NULL; el = cfg_list_next(el)) { @@ -1620,7 +1621,7 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx, } values |= MAS; } else if (strcasecmp(keyword, "secondary") == 0) { - if ((values & SEC) == SEC) { + if ((values & SCN) == SCN) { cfg_obj_log(obj, logctx, ISC_LOG_ERROR, "'check-names secondary' " "duplicated"); @@ -1628,7 +1629,7 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx, result = ISC_R_FAILURE; } } - values |= SEC; + values |= SCN; } else if (strcasecmp(keyword, "slave") == 0) { if ((values & SLA) == SLA) { cfg_obj_log(obj, logctx, ISC_LOG_ERROR, @@ -1651,7 +1652,7 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx, } } - if ((values & (SEC | SLA)) == (SEC | SLA)) { + if ((values & (SCN | SLA)) == (SCN | SLA)) { cfg_obj_log(obj, logctx, ISC_LOG_ERROR, "'check-names' cannot take both " "'secondary' and 'slave'");