From: Gabriel Barazer Date: Fri, 20 Jul 2007 15:11:38 +0000 (+0200) Subject: build-sys: missing header when NLS is disabled X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=392f76cf9a0a1f8699891e3d32c6c1bd373992cb;p=util-linux 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 --- 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 */