HomeFreeBSD

getlogin_r: fix the type of len

Description

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

Details

Provenance
kevansAuthored on
Differential Revision
D26335: getlogin_r: fix the type of len
Parents
rS365505: stand/efihttp: Work around a bug in edk2 http instance reconfiguration
Branches
Unknown
Tags
Unknown