]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r365506 getlogin_r: fix the type of len
authorKyle Evans <kevans@FreeBSD.org>
Sun, 13 Sep 2020 01:44:31 +0000 (01:44 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 13 Sep 2020 01:44:31 +0000 (01:44 +0000)
commit43e28945fb6e5c5826a1e0c9b5a8381bff9f1cc5
tree91cc0447b7149c55e44195a34c34f3831155011c
parentfcb66e94547e74d40df0da5c3cbf276ece416ef2
MFC r365506 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
include/unistd.h
lib/libc/gen/Symbol.map
lib/libc/gen/getlogin.c
lib/libc/sys/getlogin.2