]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFS r365682: getlogin_r: fix the type of len
authorKyle Evans <kevans@FreeBSD.org>
Sun, 13 Sep 2020 02:17:57 +0000 (02:17 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 13 Sep 2020 02:17:57 +0000 (02:17 +0000)
commit9de96f982db3a565fb92dd2e894227c53b3d24ac
tree73a76d63949afeb37208df17c3c7cdfdbccbab98
parent411040f20233369b4dcb31ba080a0f1c87ec479e
MFS r365682: getlogin_r: fix the type of len

getlogin_r is specified by POSIX to to take a size_t len, not int. Fix our
version to do the same, bump the symbol version due to ABI change and
provide compat.

This was reported to break compilation of Ruby 2.8.

Some discussion about the necessity of the ABI compat did take place in the
review. While many 64-bit platforms would likely be passing it in a 64-bit
register and zero-extended and thus, not notice ABI breakage, some do
sign-extend (e.g. mips).

PR: 247102
Approved by: re (gjb)
include/unistd.h
lib/libc/gen/Symbol.map
lib/libc/gen/getlogin.c
lib/libc/sys/getlogin.2