diff options
author | Mingxing Tan <tanmingxing@google.com> | 2018-06-28 19:13:20 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-28 19:16:41 -0700 |
commit | 1e7b0e4ad6d0f57f3241fe0b80a65f2c2a7f11b0 (patch) | |
tree | af92d172cedfc41e544c01a349c1d3b30bc3ff85 /tensorflow/python/lib | |
parent | 3cee10e61c1c90734317c62ea3388ec44acc8d08 (diff) |
Merge changes from github.
PiperOrigin-RevId: 202585094
Diffstat (limited to 'tensorflow/python/lib')
-rw-r--r-- | tensorflow/python/lib/core/numpy.h | 2 | ||||
-rw-r--r-- | tensorflow/python/lib/core/py_util.cc | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/python/lib/core/numpy.h b/tensorflow/python/lib/core/numpy.h index 25322b458b..d4621d61ee 100644 --- a/tensorflow/python/lib/core/numpy.h +++ b/tensorflow/python/lib/core/numpy.h @@ -29,7 +29,9 @@ limitations under the License. #define NO_IMPORT_ARRAY #endif +// Place `<locale>` before <Python.h> to avoid build failure in macOS. #include <Python.h> +#include <locale> #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" diff --git a/tensorflow/python/lib/core/py_util.cc b/tensorflow/python/lib/core/py_util.cc index dcda1f4a44..6b6c82015f 100644 --- a/tensorflow/python/lib/core/py_util.cc +++ b/tensorflow/python/lib/core/py_util.cc @@ -15,7 +15,9 @@ limitations under the License. #include "tensorflow/python/lib/core/py_util.h" +// Place `<locale>` before <Python.h> to avoid build failure in macOS. #include <Python.h> +#include <locale> #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/lib/strings/strcat.h" |