summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavidlohr Bueso2010-11-15 12:55:16 +0100
committerKarel Zak2010-11-15 13:37:27 +0100
commit97be4a37e327108e2d95ca832e71f6eda1e2d908 (patch)
treecf801e7f80080b9b2fd39cc6cbc0a8e2d714b35a /lib
parentlibblkid: add blkid_probe_get_sectors() (diff)
downloadkernel-qcow2-util-linux-97be4a37e327108e2d95ca832e71f6eda1e2d908.tar.gz
kernel-qcow2-util-linux-97be4a37e327108e2d95ca832e71f6eda1e2d908.tar.xz
kernel-qcow2-util-linux-97be4a37e327108e2d95ca832e71f6eda1e2d908.zip
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 <dave@gnu.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/tt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tt.c b/lib/tt.c
index 7d87bf54e..d3436e10b 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