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 <>
This commit is contained in:
Gabriel Barazer 2007-07-20 17:11:38 +02:00 committed by Karel Zak
parent d6ca1ec176
commit 392f76cf9a
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,6 @@
int main(int argc, char *argv[]);
@ -13,6 +16,7 @@ int main(int argc, char *argv[]);
# define N_(String) (String)
# endif
# include <locale.h>
# undef bindtextdomain
# define bindtextdomain(Domain, Directory) /* empty */
# undef textdomain
@ -21,4 +25,4 @@ int main(int argc, char *argv[]);
# define N_(Text) (Text)
#endif /* UTIL_LINUX_NLS_H */