Re: [PATCH] tty: hide unused pty_get_peer function

From: Kees Cook
Date: Tue Jun 20 2017 - 18:40:02 EST


On Tue, Jun 20, 2017 at 1:34 PM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> TIOCGPTPEER is only used for unix98 PTYs, and we get a warning
> when those are disabled:
>
> drivers/tty/pty.c:466:12: error: 'pty_get_peer' defined but not used [-Werror=unused-function]
>
> This moves the respective functions inside of the existing #ifdef.
>
> Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

-Kees

--
Kees Cook
Pixel Security