coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] pinky, who: remove redeclarations of ttyname


From: Pádraig Brady
Subject: Re: [PATCH] pinky, who: remove redeclarations of ttyname
Date: Sat, 10 Sep 2016 11:18:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/09/16 07:43, George Burgess IV wrote:
> 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;

Following on from
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v7.0-104-g22a2a43
we should probably add the type of the arguments to the declarations in system.h
(which won't usually be used anyway).  I'll amend your patch with that and push 
later.

thanks!
Pádraig



reply via email to

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