[PATCH] lib/strutils: circumvent missing localeconv()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add stub too nls.h, include it instead of locale.h.
Code in strutils handles already returned NULL.

Signed-off-by: maximilian attems <max@xxxxxxx>
---
 include/nls.h  |    6 ++++++
 lib/strutils.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/nls.h b/include/nls.h
index 9a9311b..3eabfe6 100644
--- a/include/nls.h
+++ b/include/nls.h
@@ -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
diff --git a/lib/strutils.c b/lib/strutils.c
index 6bdc01d..036ae06 100644
--- a/lib/strutils.c
+++ b/lib/strutils.c
@@ -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"
 
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux