Index: Python/pythonrun.c =================================================================== --- Python/pythonrun.c (revision 67686) +++ Python/pythonrun.c (working copy) @@ -173,7 +173,7 @@ return; initialized = 1; -#ifdef HAVE_SETLOCALE +#if defined(HAVE_SETLOCALE) && defined(LC_CTYPE) /* Set up the LC_CTYPE locale, so we can obtain the locale's charset without having to switch locales. */