diff options
author | Jan Willeke <willeke@linux.vnet.ibm.com> | 2015-07-13 15:15:39 +0200 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-07-13 10:29:54 -0400 |
commit | d7ba987a20581f324a5197154db694c1fe46429f (patch) | |
tree | c04b2e0b57fec59409b78986dedd5849e2d0ec43 | |
parent | c5d3e1d692710cca958ea218660c1877245fce67 (diff) | |
download | libseccomp-d7ba987a20581f324a5197154db694c1fe46429f.tar.gz |
s390x: fix plattform detection
Because on S390x both __s390x__ and __s390__ are defined, the check
of __s390x__ must be before __s390__.
Signed-off-by: Jan Willeke <willeke@linux.vnet.ibm.com>
[PM: subject tweaks]
Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r-- | src/arch.c | 4 | ||||
-rw-r--r-- | tools/util.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -76,10 +76,10 @@ const struct arch_def *arch_def_native = &arch_def_mips64n32; #elif __MIPSEL__ const struct arch_def *arch_def_native = &arch_def_mipsel64n32; #endif /* _MIPS_SIM_NABI32 */ +#elif __s390x__ /* s390x must be checked before s390 */ +const struct arch_def *arch_def_native = &arch_def_s390x; #elif __s390__ const struct arch_def *arch_def_native = &arch_def_s390; -#elif __s390x__ -const struct arch_def *arch_def_native = &arch_def_s390x; #else #error the arch code needs to know about your machine type #endif /* machine type guess */ diff --git a/tools/util.c b/tools/util.c index 266e027..6c44d35 100644 --- a/tools/util.c +++ b/tools/util.c @@ -62,10 +62,10 @@ #elif __MIPSEL__ #define ARCH_NATIVE AUDIT_ARCH_MIPSEL64N32 #endif /* _MIPS_SIM_NABI32 */ +#elif __s390x__ /* s390x must be checked before s390 */ +#define ARCH_NATIVE AUDIT_ARCH_S390X #elif __s390__ #define ARCH_NATIVE AUDIT_ARCH_S390 -#elif __s390x__ -#define ARCH_NATIVE AUDIT_ARCH_S390X #else #error the simulator code needs to know about your machine type #endif |