From 392f76cf9a0a1f8699891e3d32c6c1bd373992cb Mon Sep 17 00:00:00 2001 From: Gabriel Barazer Date: Fri, 20 Jul 2007 17:11:38 +0200 Subject: [PATCH] build-sys: missing header when NLS is disabled Compiling utils fail when disable NLS with the --disable-nls switch. "mkfs.c:46: error: 'LC_ALL' undeclared (first use in this function)" It is due to a missing locale.h header : When enabling NLS, nls.h includes libintl.h, which in turn includes locale.h. When disabling NLS, libintl.h isn't anymore included nor locale.h, which is needed for the setlocale() calls. Signed-off-by: Gabriel Barazer Signed-off-by: Karel Zak --- include/nls.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/nls.h b/include/nls.h index 858fdb61..f571ca50 100644 --- a/include/nls.h +++ b/include/nls.h @@ -1,3 +1,6 @@ +#ifndef UTIL_LINUX_NLS_H +#define UTIL_LINUX_NLS_H + int main(int argc, char *argv[]); #ifndef LOCALEDIR @@ -13,6 +16,7 @@ int main(int argc, char *argv[]); # define N_(String) (String) # endif #else +# include # undef bindtextdomain # define bindtextdomain(Domain, Directory) /* empty */ # undef textdomain @@ -21,4 +25,4 @@ int main(int argc, char *argv[]); # define N_(Text) (Text) #endif - +#endif /* UTIL_LINUX_NLS_H */ -- 2.39.5