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 <gabriel@oxeva.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
d6ca1ec176
commit
392f76cf9a
|
@ -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 <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
|
||||
|
||||
|
||||
#endif /* UTIL_LINUX_NLS_H */
|
||||
|
|
Loading…
Reference in New Issue