]> git.sesse.net Git - vlc/blobdiff - bin/cachegen.c
Use ifdef's to guard against setlocale() in vlc-cache-gen
[vlc] / bin / cachegen.c
index 5792ea19658154ed0369b90f237cb3bd0c6f51ca..17f01a3a1a212733041dfe9690fba5004e240f3a 100644 (file)
 #include <vlc/vlc.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <locale.h>
+
+#ifdef HAVE_SETLOCALE
+# include <locale.h>
+#endif
 
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
@@ -56,7 +59,9 @@ int main (int argc, char *argv[])
         { NULL,         no_argument,       NULL, '\0'}
     };
 
+#ifdef HAVE_SETLOCALE
     setlocale (LC_CTYPE, ""); /* needed by FromLocale() */
+#endif
 
     int c;
     while ((c = getopt_long (argc, argv, "hV", opts, NULL)) != -1)