a comment by @o-lim:
Some users may build in containers or run/use pre-built binaries. This means the compile time version of glibc may not be the same as the runtime version, or the underlying kernel may not support getrandom() even though the glibc wrapper may be present. So if getrandom() returns an error with errno == ENOSYS, then the code should fallback to using /dev/urandom.
a comment by @o-lim: