]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: init: print rlim_cur as regular integer
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 26 May 2023 12:04:18 +0000 (14:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 May 2023 12:29:52 +0000 (14:29 +0200)
commit33bbeecde3427ded13cf53c1ff99f4e6b1687b35
treec59eeaccc46ca742f31325d24ae32cb3f812fc62
parentef667b1ad89bb159b1991de0ec07d17e4320df23
BUILD: init: print rlim_cur as regular integer

haproxy does not compile anymore on macOS+clang since 425d7ad ("MINOR:
init: pre-allocate kernel data structures on init"). This is due to
rlim_cur being printed uncasted using %lu format specifier, with rlim_cur
being stored as a rlim_t which is a typedef so its size may vary depending
on the system's architecture.

This is not the first time we need to dump rlim_cur in case of errors,
there are already multiple occurences in the init code. Everywhere this
happens, rlim is casted as a regular int and printed using the '%d'
format specifier, so we do the same here as well to fix the build issue.

No backport needed unless 425d7ad gets backported.
src/haproxy.c