]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
getlogin_r: fix the type of len
authorKyle Evans <kevans@FreeBSD.org>
Wed, 9 Sep 2020 18:07:13 +0000 (18:07 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Wed, 9 Sep 2020 18:07:13 +0000 (18:07 +0000)
commit69112cca60cb63495de2550f90162eb1b095a157
tree37222cb1fbcb4e94b8311c234bc8ae83e8fb8b0e
parentd455cd5ac36f4c1ac76f04e2c2bb4bfb00fe8bcd
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
Submitted by: Bertram Scharpf <software@bertram-scharpf.de> (original)
Submitted by: cem (ABI compat)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26335
include/unistd.h
lib/libc/gen/Symbol.map
lib/libc/gen/getlogin.c
lib/libc/sys/getlogin.2