summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h b/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
index 8796f1d944b..884514da992 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
@@ -32,6 +32,12 @@
#undef _XOPEN_SOURCE
#endif
+// Include locale before Python so _PY_PORT_CTYPE_UTF8_ISSUE doesn't cause
+// macro redefinitions.
+#if defined(__APPLE__)
+#include <locale>
+#endif
+
// Include python for non windows machines
#include <Python.h>
#endif // LLDB_DISABLE_PYTHON
OpenPOWER on IntegriCloud