]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r339880 (arichardson): Fix get_maxfds() in jevents
authorEd Maste <emaste@FreeBSD.org>
Mon, 30 Mar 2020 22:02:27 +0000 (22:02 +0000)
committerEd Maste <emaste@FreeBSD.org>
Mon, 30 Mar 2020 22:02:27 +0000 (22:02 +0000)
commit40aa6c3f728d3189187cff1207124bc655e34c92
tree16a4effcb70cbde2a78dbfdf363281aea21d89d0
parent94788f8dcdf853e5037e24957c73c373840dfa9e
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.
lib/libpmc/pmu-events/jevents.c