فهرست منبع

slstatus: set locale

I want my date & time printed according my locale settings.
This commit enables that

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Kurt Van Dijck 8 سال پیش
والد
کامیت
fb1f1dea2e
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      slstatus.c

+ 2 - 0
slstatus.c

@@ -6,6 +6,7 @@
 #include <ifaddrs.h>
 #include <limits.h>
 #include <linux/wireless.h>
+#include <locale.h>
 #include <netdb.h>
 #include <pwd.h>
 #include <signal.h>
@@ -841,6 +842,7 @@ main(int argc, char *argv[])
 		usage();
 	}
 
+	setlocale(LC_ALL, "");
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = terminate;
 	sigaction(SIGINT,  &act, NULL);