diff options
author | Simon McVittie <smcv@debian.org> | 2021-10-05 10:55:32 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2023-12-10 22:24:53 +0000 |
commit | 6f22c14f9d37edfce6009653d1acbbc996415a62 (patch) | |
tree | 8c0219f45ee9fd9952db65b0a3458576ad27240a | |
parent | 1aea9ea1e6d15ed6f4346ff42be409932ddb1944 (diff) |
savegame: Add compatibility with older Debian builds
Older builds were accidentally using Debian CPU names such as amd64,
arm64, ppc64el and powerpc, instead of `uname -m` output such as x86_64.
Accept both.
Forwarded: not-needed
Gbp-Pq: Topic debian
Gbp-Pq: Name savegame-Add-compatibility-with-older-Debian-builds.patch
-rw-r--r-- | src/game/savegame/savegame.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/savegame/savegame.c b/src/game/savegame/savegame.c index 0f929ff..b80d1d8 100644 --- a/src/game/savegame/savegame.c +++ b/src/game/savegame/savegame.c @@ -895,6 +895,16 @@ ReadGame(const char *filename) // instead of "i386" set due to a bug in the Makefile. // This quirk allows loading those savegames anyway if (save_ver >= 4 || strcmp(sv.arch, "AMD64") != 0) +#elif defined(__aarch64__) + // Debian packaging accidentally used this, + // accept it as an alias + if (strcmp(sv.arch, "arm64") != 0) +#elif defined(__powerpc__) && defined(__ppc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + if (strcmp(sv.arch, "ppc64el") != 0) +#elif defined(__powerpc__) && !defined(__ppc64__) + if (strcmp(sv.arch, "powerpc") != 0) +#elif defined(__x86_64__) + if (strcmp(sv.arch, "amd64") != 0) #endif { fclose(f); |