]> 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 21:46:10 +0000 (07:46 +1000)
CHANGES
lib/bind9/check.c

diff --git a/CHANGES b/CHANGES
index 52eaf73dc23d2d650f3a6c19ff3f6ec2d585128a..ade4b3ca76dd5393d8d19a394006767d715b1210 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 1b1ae19ecb02907717158159cd4384dc4fd99744..45696b54cae81866b3c20552f6ba07c14ce4f108 100644 (file)
@@ -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'");