From ec9f71c4892d209878956b8c7186752c4226ef51 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Sun, 22 Nov 2009 05:17:22 +0000 Subject: [PATCH] The output of perror(1) is now showing local messages for locales supported by libc/nls PR: bin/140499 Approved by: gnn@ --- usr.bin/perror/perror.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c index 6d852a7a3717..ef3db35b64b2 100644 --- a/usr.bin/perror/perror.c +++ b/usr.bin/perror/perror.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static void usage(void); @@ -43,6 +44,7 @@ main(int argc, char **argv) char *errstr; long errnum; + (void) setlocale(LC_MESSAGES, ""); if (argc != 2) usage();