HomeFreeBSD

MFC r339880 (arichardson): Fix get_maxfds() in jevents

Description

MFC r339880 (arichardson): Fix get_maxfds() in jevents

If RLIM_INFINITY == -1ULL (such as on macOS) the min() call will result
in a value of less than 1 being returned. This causes nftw() to fail
with EINVAL.

While touching this file also fix includes to work on Linux/macOS and don't
declare snprintf since it may have different attributes in the system
headers there.

Details

Provenance
emasteAuthored on
Parents
rS359470: kern_sendfile.c: do not release sfio reference on error.
Branches
Unknown
Tags
Unknown