]> git.ipfire.org Git - thirdparty/coreutils.git/commit
pinky,who: remove redeclarations of ttyname
authorGeorge Burgess IV <gbiv@chromium.org>
Sat, 10 Sep 2016 06:43:19 +0000 (23:43 -0700)
committerPádraig Brady <P@draigBrady.com>
Sun, 11 Sep 2016 11:46:02 +0000 (12:46 +0100)
commite0953783024a113b186547aca186777f9ce3b798
tree89e12f2dc9d0df753dda7c30a26d84adc51130e2
parent677ae07083f41754fc9d3c7a0559248063908e30
pinky,who: remove redeclarations of ttyname

Given that `ttyname` is already conditionally declared in src/system.h,
other declarations are redundant and problematic for example in ChromeOS
which has a new FORTIFY implementation that, as an artifact of how it's
implemented, causes the compiler to complain if certain standard library
functions are redeclared without special compiler-specific attributes.

* src/pinky.c: Remove declaration (which was unused anyway).
* src/who.c: Remove declaration.
* src/system.h (getlogin, getuid, geteuid, getgrgid, getpwuid, ttyname):
Add the parameter type to the declarations to avoid warnings when these
backup declarations are used.
src/pinky.c
src/system.h
src/who.c