diff --git a/util/checklibs.sh b/util/checklibs.sh index 9e00c8f784..20914b18d2 100755 --- a/util/checklibs.sh +++ b/util/checklibs.sh @@ -25,6 +25,21 @@ list=`git grep -l snprintf lib bin | echo "$list" } +# +# Check for missing #include +# +list=`git grep -wl strerror_r lib bin | + grep '\.c$' | + grep -vE -e '(lib/bind|lib/dns/rdata|lib/dns/gen.c)' \ + -e lib/isc/string.c \ + -e '(lib/isc/win32/time.c|dlzexternal/driver.c)' | + xargs grep -EL "(isc/strerr.h)" 2> /dev/null` +[ -n "$list" ] && { + status=1 + echo 'Missing #include :' + echo "$list" +} + # # Check for missing #include " #