aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-02 19:02:07 +0200
committerMax Kellermann <max@duempel.org>2008-10-02 19:02:07 +0200
commit2fa18f35d878e280bbd8299aa4048bb59e183165 (patch)
treec7e7bdda00f506d795faa3af5ce4662d87e766a1 /src/main.c
parentfe84050389a15b45ee8071ebdc85488d8d3d36b4 (diff)
downloadmpd-2fa18f35d878e280bbd8299aa4048bb59e183165.tar.gz
mpd-2fa18f35d878e280bbd8299aa4048bb59e183165.tar.xz
mpd-2fa18f35d878e280bbd8299aa4048bb59e183165.zip
fix compiler errors without locale.h
The code did not compile when HAVE_LOCALE_H was not set. Also don't compile all that code in charset.c, when there is no locale.h.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 07198e7de..668d5aa33 100644
--- a/src/main.c
+++ b/src/main.c
@@ -323,7 +323,9 @@ int
main(int argc, const char *argv[])
{
struct sigaction act;
+#ifdef HAVE_LOCALE_H
const char *charset = NULL;
+#endif
GIOChannel *keyboard_channel;
#ifdef HAVE_LOCALE_H
@@ -335,7 +337,6 @@ main(int argc, const char *argv[])
setlocale(LC_CTYPE,"");
/* initialize charset conversions */
charset = charset_init();
-#endif
/* initialize i18n support */
#ifdef ENABLE_NLS
@@ -344,6 +345,7 @@ main(int argc, const char *argv[])
bind_textdomain_codeset(GETTEXT_PACKAGE, charset);
textdomain(GETTEXT_PACKAGE);
#endif
+#endif
/* initialize options */
options_init();