build: disable -Wenum-constexpr-conversion with clang 18

Refs: #5300
Change-Id: Ib62d0e6498a0ff2e1a54b136ddcc61caef69c3bd
diff --git a/.jenkins.d/40-headers-check.sh b/.jenkins.d/40-headers-check.sh
index 40e5f34..28cc98f 100755
--- a/.jenkins.d/40-headers-check.sh
+++ b/.jenkins.d/40-headers-check.sh
@@ -17,7 +17,7 @@
 
 CXX=${CXX:-g++}
 STD=-std=c++17
-CXXFLAGS="-O2 -Wall -Wno-unneeded-internal-declaration -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PCFILE)"
+CXXFLAGS="-O2 -Wall -Wno-unknown-warning-option -Wno-enum-constexpr-conversion -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PCFILE)"
 INCLUDEDIR="$(pkg-config --variable=includedir $PCFILE)"/$PROJ
 
 echo "Using: $CXX $STD $CXXFLAGS"
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index bee5072..48f4274 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -223,6 +223,9 @@
         elif Utils.unversioned_sys_platform() == 'freebsd':
             # Bug #4790
             flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
+        if self.getCompilerVersion(conf) >= (18, 0, 0):
+            # Bug #5300
+            flags['CXXFLAGS'] += ['-Wno-enum-constexpr-conversion']
         return flags
 
     __cxxFlags = [