diff options
| author | Thorsten Glaser <tg@mirbsd.de> | 2020-10-09 16:00:39 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-10-09 16:00:39 +0200 |
| commit | e8633d5e6f4d2c46fbb6e14608bda7dff82ff071 (patch) | |
| tree | b89107f5456284f3691a12060218a00cf2363faf | |
| parent | 6deec21de449a61feef59b7cd79934b87de13243 (diff) | |
Adjust syscall numbers for x32 vs. amd64, fixes FTBFS on x32
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | debian/patches/series | 1 | ||||
| -rw-r--r-- | debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch | 124 |
3 files changed, 131 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index d994002c..b06a47fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.27.90-3) UNRELEASED; urgency=medium + + * Adjust syscall numbers for x32 vs. amd64, fixes FTBFS on x32 + + -- Thorsten Glaser <tg@mirbsd.de> Thu, 08 Oct 2020 21:04:51 +0200 + network-manager (1.27.90-2) unstable; urgency=medium * Cherry-pick a couple of upstream patches. diff --git a/debian/patches/series b/debian/patches/series index 117a27db..78fcb807 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ platform-tests-print-details-about-test-failure-for-test_.patch platform-tests-skip-test_platform_ip_address_pretty_sort_.patch c-rbtree-reduce-alignment-constraints.patch systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch +systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch diff --git a/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch new file mode 100644 index 00000000..75b2fd2b --- /dev/null +++ b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch @@ -0,0 +1,124 @@ +From: mirabilos <tg@debian.org> +Date: Fri, 9 Oct 2020 15:58:48 +0200 +Subject: fixup syscall numbers for x32 vs. amd64 + +--- + shared/systemd/src/basic/missing_syscall.h | 28 +++++++++++++++++----------- + 1 file changed, 17 insertions(+), 11 deletions(-) + +diff --git a/shared/systemd/src/basic/missing_syscall.h b/shared/systemd/src/basic/missing_syscall.h +index d11a77d..82daa68 100644 +--- a/shared/systemd/src/basic/missing_syscall.h ++++ b/shared/systemd/src/basic/missing_syscall.h +@@ -15,6 +15,12 @@ + #include <asm/sgidefs.h> + #endif + ++#if defined(__x86_64__) && defined(__ILP32__) ++#define systemd_SC_arch_bias(x) ((x) | /* __X32_SYSCALL_BIT */ 0x40000000) ++#else ++#define systemd_SC_arch_bias(x) (x) ++#endif ++ + #include "missing_keyctl.h" + #include "missing_stat.h" + +@@ -36,7 +42,7 @@ static inline int missing_pivot_root(const char *new_root, const char *put_old) + /* ======================================================================= */ + + #if defined __x86_64__ +-# define systemd_NR_memfd_create 319 ++# define systemd_NR_memfd_create systemd_SC_arch_bias(319) + #elif defined __arm__ + # define systemd_NR_memfd_create 385 + #elif defined __aarch64__ +@@ -93,7 +99,7 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) { + /* ======================================================================= */ + + #if defined __x86_64__ +-# define systemd_NR_getrandom 318 ++# define systemd_NR_getrandom systemd_SC_arch_bias(318) + #elif defined(__i386__) + # define systemd_NR_getrandom 355 + #elif defined(__arm__) +@@ -169,7 +175,7 @@ static inline pid_t missing_gettid(void) { + /* ======================================================================= */ + + #if defined(__x86_64__) +-# define systemd_NR_name_to_handle_at 303 ++# define systemd_NR_name_to_handle_at systemd_SC_arch_bias(303) + #elif defined(__i386__) + # define systemd_NR_name_to_handle_at 341 + #elif defined(__arm__) +@@ -226,7 +232,7 @@ static inline int missing_name_to_handle_at(int fd, const char *name, struct fil + #elif defined __arm__ + # define systemd_NR_setns 375 + #elif defined(__x86_64__) +-# define systemd_NR_setns 308 ++# define systemd_NR_setns systemd_SC_arch_bias(308) + #elif defined(__i386__) + # define systemd_NR_setns 346 + #elif defined(__powerpc__) +@@ -279,7 +285,7 @@ static inline pid_t raw_getpid(void) { + /* ======================================================================= */ + + #if defined __x86_64__ +-# define systemd_NR_renameat2 316 ++# define systemd_NR_renameat2 systemd_SC_arch_bias(316) + #elif defined __arm__ + # define systemd_NR_renameat2 382 + #elif defined __aarch64__ +@@ -388,7 +394,7 @@ static inline key_serial_t missing_request_key(const char *type, const char *des + /* ======================================================================= */ + + #if defined(__x86_64__) +-# define systemd_NR_copy_file_range 326 ++# define systemd_NR_copy_file_range systemd_SC_arch_bias(326) + #elif defined(__i386__) + # define systemd_NR_copy_file_range 377 + #elif defined __s390__ +@@ -440,7 +446,7 @@ static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in, + #if defined __i386__ + # define systemd_NR_bpf 357 + #elif defined __x86_64__ +-# define systemd_NR_bpf 321 ++# define systemd_NR_bpf systemd_SC_arch_bias(321) + #elif defined __aarch64__ + # define systemd_NR_bpf 280 + #elif defined __arm__ +@@ -492,7 +498,7 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) { + # if defined __i386__ + # define systemd_NR_pkey_mprotect 380 + # elif defined __x86_64__ +-# define systemd_NR_pkey_mprotect 329 ++# define systemd_NR_pkey_mprotect systemd_SC_arch_bias(329) + # elif defined __aarch64__ + # define systemd_NR_pkey_mprotect 288 + # elif defined __arm__ +@@ -545,7 +551,7 @@ assert_cc(__NR_pkey_mprotect == systemd_NR_pkey_mprotect); + #elif defined __sparc__ + # define systemd_NR_statx 360 + #elif defined __x86_64__ +-# define systemd_NR_statx 332 ++# define systemd_NR_statx systemd_SC_arch_bias(332) + #else + # warning "statx() syscall number unknown for your architecture" + #endif +@@ -647,7 +653,7 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, + #elif defined __ia64__ + # define systemd_NR_pidfd_send_signal (424 + 1024) + #else +-# define systemd_NR_pidfd_send_signal 424 ++# define systemd_NR_pidfd_send_signal systemd_SC_arch_bias(424) + #endif + + /* may be (invalid) negative number due to libseccomp, see PR 13319 */ +@@ -691,7 +697,7 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un + #elif defined __ia64__ + # define systemd_NR_pidfd_open (434 + 1024) + #else +-# define systemd_NR_pidfd_open 434 ++# define systemd_NR_pidfd_open systemd_SC_arch_bias(434) + #endif + + /* may be (invalid) negative number due to libseccomp, see PR 13319 */ |