summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/busybox.c6
-rw-r--r--busybox.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index 41b6069..9cc8848 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -82,9 +82,13 @@ int main(int argc, char **argv)
}
#endif
-#ifdef BB_LOCALE_SUPPORT
+#ifdef BB_LOCALE_SUPPORT
+#ifdef BB_INIT
if(getpid()!=1) /* Do not set locale for `init' */
+#endif
+ {
setlocale(LC_ALL, "");
+ }
#endif
run_applet_by_name(applet_name, argc, argv);
diff --git a/busybox.c b/busybox.c
index 41b6069..9cc8848 100644
--- a/busybox.c
+++ b/busybox.c
@@ -82,9 +82,13 @@ int main(int argc, char **argv)
}
#endif
-#ifdef BB_LOCALE_SUPPORT
+#ifdef BB_LOCALE_SUPPORT
+#ifdef BB_INIT
if(getpid()!=1) /* Do not set locale for `init' */
+#endif
+ {
setlocale(LC_ALL, "");
+ }
#endif
run_applet_by_name(applet_name, argc, argv);