diff options
author | Simon McVittie <smcv@collabora.com> | 2022-05-10 17:01:01 +0100 |
---|---|---|
committer | Phaedrus Leeds <mwl458@gmail.com> | 2022-06-27 10:02:25 -0700 |
commit | 836b0fb6046475a0f25c496bc3ee4fa1dad91e12 (patch) | |
tree | cdde4f0caeea8b3759ba16f79955659a61644798 | |
parent | ea879dc38c40770ad9324c50582a1f0de5478b45 (diff) | |
download | flatpak-836b0fb6046475a0f25c496bc3ee4fa1dad91e12.tar.gz |
try-syscall: Use compiler-predefined macros to detect mips ABI
_MIPS_SIM_ABI32 etc. are defined by Linux <asm/sgidefs.h>, which is
included by glibc <sys/syscall.h> (which defers to Linux headers to
get syscall numbers), but not by musl <sys/syscall.h>.
_ABIO32 etc. are predefined by the compiler, so they are always
available, regardless of libc. References:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=27d54b2a6c18ef1ae50f1a5b432d590438445b90
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=0ea339ea4d9c3e04ae17da6bf389617eb0251e57
Originally containers/bubblewrap#492 in bubblewrap.
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | tests/try-syscall.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/try-syscall.c b/tests/try-syscall.c index df350542..9547e58d 100644 --- a/tests/try-syscall.c +++ b/tests/try-syscall.c @@ -24,11 +24,11 @@ #include <sys/types.h> #if defined(_MIPS_SIM) -# if _MIPS_SIM == _MIPS_SIM_ABI32 +# if _MIPS_SIM == _ABIO32 # define MISSING_SYSCALL_BASE 4000 -# elif _MIPS_SIM == _MIPS_SIM_ABI64 +# elif _MIPS_SIM == _ABI64 # define MISSING_SYSCALL_BASE 5000 -# elif _MIPS_SIM == _MIPS_SIM_NABI32 +# elif _MIPS_SIM == _ABIN32 # define MISSING_SYSCALL_BASE 6000 # else # error "Unknown MIPS ABI" |