diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-09-12 21:04:41 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-09-12 21:04:41 +0100 |
commit | 55b6f72223675c226238a5110d674a852e9922d3 (patch) | |
tree | c2112e30672eec3d7abb27d95e949ccb0c1e7e8b /blabouncer.c | |
parent | 3b836818fe3626798924a56f1660ab5423998094 (diff) |
Adopt the locale of the environment for locale-dependent things like date formats.
Diffstat (limited to 'blabouncer.c')
-rw-r--r-- | blabouncer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/blabouncer.c b/blabouncer.c index cfc1f2d..7052117 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -39,6 +39,7 @@ #include <openssl/ssl.h> #include <openssl/err.h> #include <openssl/bio.h> +#include <locale.h> #include "functions.h" #include "sockets.h" @@ -857,6 +858,9 @@ int main(int argc, char *argv[]) { // Structure of our various settings which are to either be read from the configuration file or set at runtime struct settings settings; + // Adopt the locale of the environment for locale-dependent things like date formats later on + setlocale(LC_ALL, ""); + // Terminate our global debug file string in case it's referenced before being read from file debugpath[0] = '\0'; |