The bottom of the manpage on getlogin says:
The getlogin() function first appeared in 4.4BSD.
4.2 Berkeley Distribution June 9, 1993
It is wrong for it to claim to be 4.2BSD docs when system call was
introduced with 4.4BSD, right?
call mpp :-)
Fixed in revision 1.9 of getlogin.2.