NetBSD's libc is intentionally rigged up so that calling <ctype.h> functions with an argument of type char, which is in general undefined behavior. (These functions are defined by the standard to accept values between 0 and UCHAR_MAX, or EOF.) This caused a failed build in the changes for WT-8389.
Fix is straightforward, pull request coming in a moment.