From: Davidlohr Bueso Date: Mon, 15 Nov 2010 11:55:16 +0000 (-0300) Subject: lib/tt: fix langinfo build break X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97be4a37e327108e2d95ca832e71f6eda1e2d908;p=util-linux lib/tt: fix langinfo build break When HAVE_LANGINFO_H is not defined we break the compilation in tt.c: CC tt.o tt.c: In function ‘tt_new_table’: tt.c:142: warning: implicit declaration of function ‘nl_langinfo’ tt.c:142: error: ‘CODESET’ undeclared (first use in this function) tt.c:142: error: (Each undeclared identifier is reported only once tt.c:142: error: for each function it appears in.) make: *** [tt.o] Error 1 Signed-off-by: Davidlohr Bueso --- diff --git a/lib/tt.c b/lib/tt.c index 7d87bf54..d3436e10 100644 --- a/lib/tt.c +++ b/lib/tt.c @@ -138,7 +138,7 @@ struct tt *tt_new_table(int flags) INIT_LIST_HEAD(&tb->tb_lines); INIT_LIST_HEAD(&tb->tb_columns); -#ifdef HAVE_WIDECHAR +#if defined(HAVE_WIDECHAR) && defined(HAVE_LANGINFO_H) if (!(flags & TT_FL_ASCII) && !strcmp(nl_langinfo(CODESET), "UTF-8")) tb->symbols = &utf8_tt_symbols; else