]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/strutils: circumvent missing localeconv()
authormaximilian attems <max@stro.at>
Thu, 31 May 2012 17:40:49 +0000 (19:40 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 5 Jun 2012 12:54:12 +0000 (14:54 +0200)
Add stub too nls.h, include it instead of locale.h.
Code in strutils handles already returned NULL.

Signed-off-by: maximilian attems <max@stro.at>
include/nls.h
lib/strutils.c

index 9a9311bdcc94b3681c572c771639e2db0a2c2abd..3eabfe63b3ee9748f780ab1ed26578c9a94c0c0e 100644 (file)
@@ -12,6 +12,12 @@ int main(int argc, char *argv[]);
 #else
 # undef setlocale
 # define setlocale(Category, Locale) /* empty */
+struct lconv
+{
+       char *decimal_point;
+};
+# undef localeconv
+# define localeconv() NULL
 #endif
 
 #ifdef ENABLE_NLS
index 6bdc01d380777419ac54f7b4690fabb5e2461fdd..036ae06398002eb4f587d418b0a1c4824ceba2e5 100644 (file)
@@ -9,10 +9,10 @@
 #include <ctype.h>
 #include <errno.h>
 #include <sys/stat.h>
-#include <locale.h>
 #include <string.h>
 
 #include "c.h"
+#include "nls.h"
 #include "strutils.h"
 #include "bitops.h"