summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--handler.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7f4be42..f18a8c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,8 @@ LT_INIT
PKG_CHECK_MODULES([TIDY], [tidy])
AC_CHECK_HEADERS([threads.h],
[AC_DEFINE([HAVE_THREADS_H])])
+AC_CHECK_HEADERS([langinfo.h],
+ [AC_DEFINE([HAVE_LANGINFO_H])])
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_CHECK_FUNCS([memset])
diff --git a/handler.c b/handler.c
index a5833b8..eb456c1 100644
--- a/handler.c
+++ b/handler.c
@@ -1,6 +1,8 @@
#include <stdbool.h>
#include <locale.h>
+#ifdef HAVE_LANGINFO_H
#include <langinfo.h>
+#endif
#include <tidy.h>
#include <tidybuffio.h>
#include "icclient.h"
@@ -99,7 +101,7 @@ static void recurse(TidyDoc doc, TidyNode tnod, struct icclient_catalog **catalo
strcpy(*category, text);
} else {
is_price = false;
-#ifndef __ANDROID__
+#ifdef HAVE_LANGINFO_H
char *symbol = nl_langinfo_l(CRNCYSTR, loc);
size_t symbol_len = strlen(symbol) - 1;
if (symbol[0] == '-')