Page MenuHomeFreeBSD

Fix get_maxfds() in jevents
ClosedPublic

Authored by arichardson on Oct 24 2018, 8:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 11 2024, 1:09 AM
Unknown Object (File)
Oct 10 2024, 10:12 PM
Unknown Object (File)
Oct 4 2024, 10:05 AM
Unknown Object (File)
Oct 4 2024, 2:15 AM
Unknown Object (File)
Oct 3 2024, 3:28 PM
Unknown Object (File)
Oct 2 2024, 1:11 PM
Unknown Object (File)
Oct 1 2024, 5:42 PM
Unknown Object (File)
Oct 1 2024, 4:03 PM
Subscribers

Details

Summary

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.

Test Plan

jevents now generates a .c file on macOS

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

LGTM. Are you cross-building from OSX?

This revision is now accepted and ready to land.Oct 25 2018, 6:51 PM

Yes, the current set of patches required (for macos and linux) can be seen here: https://github.com/arichardson/freebsd/tree/crossbuild-aug2018?files=1

Yes, the current set of patches required (for macos and linux) can be seen here: https://github.com/arichardson/freebsd/tree/crossbuild-aug2018?files=1

That's excellent. How much more work would it take to get FreeBSD or parts of it building in some of the various public Linux centric CI systems?

This revision was automatically updated to reflect the committed changes.

Yes, the current set of patches required (for macos and linux) can be seen here: https://github.com/arichardson/freebsd/tree/crossbuild-aug2018?files=1

That's excellent. How much more work would it take to get FreeBSD or parts of it building in some of the various public Linux centric CI systems?

I've successfully built on various Linux distributions with only a few options disabled (such as LOCALES). What still needs to be done is review+patch cleanup.