Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- term-utils/write.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/term-utils/write.c b/term-utils/write.c index e8532f6..4c6a25f 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -312,12 +312,12 @@ int main(int argc, char **argv) } /* check that sender has write enabled */ - if (isatty(fileno(stdin))) - myttyfd = fileno(stdin); - else if (isatty(fileno(stdout))) - myttyfd = fileno(stdout); - else if (isatty(fileno(stderr))) - myttyfd = fileno(stderr); + if (isatty(STDIN_FILENO)) + myttyfd = STDIN_FILENO; + else if (isatty(STDOUT_FILENO)) + myttyfd = STDOUT_FILENO; + else if (isatty(STDERR_FILENO)) + myttyfd = STDERR_FILENO; else myttyfd = -1; -- 2.8.2 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html