[PATCH] lib/tt: fix langinfo build break

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Davidlohr Bueso <dave@xxxxxxx>
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@xxxxxxx>
---
 lib/tt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/tt.c b/lib/tt.c
index 7d87bf5..d3436e1 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
-- 
1.7.1



--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux