coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] pinky, who: remove redeclarations of ttyname


From: George Burgess IV
Subject: [PATCH] pinky, who: remove redeclarations of ttyname
Date: Fri, 9 Sep 2016 23:43:19 -0700

Given that `ttyname` is already conditionally declared in src/system.h,
these other two declarations are redundant (and the one in pinky was unused
anyway).

Signed-off-by: George Burgess IV <address@hidden>

---

This matters because ChromeOS 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 on them. When building coreutils with said FORTIFY
impl, the compiler gets upset about these `ttyname` redecls. Removing them
allows coreutils to build successfully.

 src/pinky.c | 2 --
 src/who.c   | 2 --
 2 files changed, 4 deletions(-)

diff --git a/src/pinky.c b/src/pinky.c
index 68566fd..7685609 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -37,8 +37,6 @@
   proper_name ("David MacKenzie"), \
   proper_name ("Kaveh Ghazi")
 
-char *ttyname (int);
-
 /* If true, display the hours:minutes since each user has touched
    the keyboard, or blank if within the last minute, or days followed
    by a 'd' if not within the last day. */
diff --git a/src/who.c b/src/who.c
index c6fc4dc..f56c718 100644
--- a/src/who.c
+++ b/src/who.c
@@ -96,8 +96,6 @@
 # define UT_ID(U) "??"
 #endif
 
-char *ttyname (int);
-
 /* If true, attempt to canonicalize hostnames via a DNS lookup. */
 static bool do_lookup;
 
-- 
2.8.0.rc3.226.g39d4020




reply via email to

[Prev in Thread] Current Thread [Next in Thread]