diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2020-09-09 18:07:13 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2020-09-09 18:07:13 +0000 |
commit | 69112cca60cb63495de2550f90162eb1b095a157 (patch) | |
tree | 37222cb1fbcb4e94b8311c234bc8ae83e8fb8b0e /include | |
parent | d455cd5ac36f4c1ac76f04e2c2bb4bfb00fe8bcd (diff) | |
download | src-test-69112cca60cb63495de2550f90162eb1b095a157.tar.gz src-test-69112cca60cb63495de2550f90162eb1b095a157.zip |
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
Notes
Notes:
svn path=/head/; revision=365506
Diffstat (limited to 'include')
-rw-r--r-- | include/unistd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h index 02df2515eaaa6..9fa9bebbc4c05 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -399,7 +399,7 @@ int ftruncate(int, off_t); #endif #if __POSIX_VISIBLE >= 199506 -int getlogin_r(char *, int); +int getlogin_r(char *, size_t); #endif /* 1003.1-2001 */ |