]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle namespace clash over 'SEC' on illumos.
authorMark Andrews <marka@isc.org>
Thu, 9 Jul 2020 04:49:47 +0000 (14:49 +1000)
committerMark Andrews <marka@isc.org>
Mon, 13 Jul 2020 23:06:46 +0000 (09:06 +1000)
(cherry picked from commit 18eef2024187bd0c7fcb95bcec14b068a564b1c1)

CHANGES
lib/bind9/check.c

diff --git a/CHANGES b/CHANGES
index 6e5ab824fcbd38908fe3875d4ca811b31ff33623..be79b0a498f42c00043a52e9db84fa1765d71605 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+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]
 
index c676ff4d22d594fa785e1ae2de8c05e0a254d606..0d802ddfa2785b1658b50b5c393943b79d9abcee 100644 (file)
@@ -1573,7 +1573,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))
                {
@@ -1601,7 +1602,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");
@@ -1609,7 +1610,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,
@@ -1632,7 +1633,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'");