Page MenuHomeFreeBSD

getlogin_r: fix the type of len
ClosedPublic

Authored by kevans on Sep 5 2020, 2:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 31, 10:51 PM
Unknown Object (File)
Mar 7 2024, 10:27 PM
Unknown Object (File)
Mar 7 2024, 10:27 PM
Unknown Object (File)
Mar 7 2024, 10:27 PM
Unknown Object (File)
Mar 7 2024, 10:15 PM
Unknown Object (File)
Mar 7 2024, 4:17 PM
Unknown Object (File)
Jan 8 2024, 8:26 AM
Unknown Object (File)
Dec 20 2023, 3:49 AM
Subscribers

Details

Summary

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.

PR: 247102
Submitted by: Bertram Scharpf <software@bertram-scharpf.de> (original), cem (ABI compat)
MFC after: 3 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kevans requested review of this revision.Sep 5 2020, 2:03 AM
This revision is now accepted and ready to land.Sep 5 2020, 9:51 AM
jhb added a subscriber: jhb.

I suspect it's not even an ABI issue since all our 64-bit platforms would pass 'len' in a 64-bit register that is (probably) zero-extended. However, the shim is cheap.

In D26335#586194, @jhb wrote:

I suspect it's not even an ABI issue since all our 64-bit platforms would pass 'len' in a 64-bit register that is (probably) zero-extended. However, the shim is cheap.

At least mips sign-extends.

This revision was automatically updated to reflect the committed changes.