]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Work around broken Bash implementation on MacOS 13.6.1
authorMark Andrews <marka@isc.org>
Fri, 27 Oct 2023 23:35:51 +0000 (10:35 +1100)
committerMark Andrews <marka@isc.org>
Tue, 31 Oct 2023 03:15:59 +0000 (03:15 +0000)
The bash implementation on MacOS 13.6.1 is:

% /bin/sh --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin22)
Copyright (C) 2007 Free Software Foundation, Inc.

This fails to handle 'case' inside of $().  Reimplement using
if/elif/fi.

util/checklibs.sh

index ef96a9519b923e71d8f5b39d04712a4feba8c79f..16675fa0d4a5879148dbc38c0379c3da984d381e 100755 (executable)
@@ -86,10 +86,11 @@ for lib in $(git ls-files -c lib \
     | xargs grep "$pat" \
     | sed -e 's/.*://' -e 's/(.*//' \
     | while read p; do
-      case $p in
-        isc_ntsecurity_getaccountgroups) continue ;; # internal
-        isc_socketmgr_getmaxsockets) p=isc__socketmgr_getmaxsockets ;;
-      esac
+      if test "$p" = isc_ntsecurity_getaccountgroups; then
+        continue
+      elif test "$p" = isc_socketmgr_getmaxsockets; then
+        p=isc__socketmgr_getmaxsockets
+      fi
       grep -q "^${p}"'$' $def && continue
       test $lib = isc -a -f lib/isc/win32/libisc.def.exclude \
         && grep -q "^${p}"'$' lib/isc/win32/libisc.def.exclude \