Commit 18eef202 authored by Mark Andrews's avatar Mark Andrews
Browse files

Handle namespace clash over 'SEC' on illumos.

parent bc5bd577
Pipeline #46699 passed with stages
in 20 minutes and 13 seconds
5469. [port] illumos: SEC is defined in <sys/time.h> which
conflicted with our use of SEC. [GL #1993]
5468. [bug] Address potential double unlock in process_fd().
[GL #2005]
......
......@@ -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 <sys/time.h> 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'");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment