autoconf check for struct stat pulls in fcntl.h not stat.h
https://gitlab.isc.org/isc-projects/bind9/-/blob/main/configure.ac#L1079 includes sys/fcntl.h when checking struct stat members to determine if nanoseconds are available. At least on OpenBSD and raspbian this is in stat.h which is not pulled in by fcntl.h so the test always fails.