diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-11-09 09:18:13 +0000 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-11-12 23:30:22 +0000 |
commit | d8705a73771ea213b1e52c6cdfad3bd05b3210c5 (patch) | |
tree | 377390183a80b81065c73900b2f91ae70a744cf1 /src | |
parent | a7105c617fa921904213d7509746a8f6c51c002f (diff) | |
download | gem5-d8705a73771ea213b1e52c6cdfad3bd05b3210c5.tar.xz |
systemc: Push python headers on top of sources
Some build failures has been seen after USE_SYSTEMC being True by
default and that has been caused by double definition of _XOPEN_SOURCE
and _POSIX_C_SOURCE in some python versions (like 2.7.5, 2.7.13) and
/usr/include/features.h (used by gcc)
Python definition should preceed features.h one, since the latter will
manually #undef them before #define them.
Change-Id: I774711aaf8145df9ad7677a393a60cf3662d6816
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14095
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/systemc/core/sc_main_python.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemc/core/sc_main_python.cc b/src/systemc/core/sc_main_python.cc index 66fae58bb..60d57b478 100644 --- a/src/systemc/core/sc_main_python.cc +++ b/src/systemc/core/sc_main_python.cc @@ -27,12 +27,14 @@ * Authors: Gabe Black */ +// This should be on top since it is including python headers +#include "systemc/core/python.hh" + #include <cstring> #include <string> #include "base/fiber.hh" #include "base/logging.hh" -#include "systemc/core/python.hh" #include "systemc/core/sc_main_fiber.hh" namespace |