Skip to content

Commit

Permalink
Use correct syscall numbers for x32 port
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemj committed Apr 11, 2020
1 parent 3fcb728 commit bfab85b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ libaio (0.3.112-6) UNRELEASED; urgency=medium
* Switch to Standards-Version 4.5.0 (no changes needed).
* Do not pass --add-udeb to dh_makeshlibs anymore, it's autodetected since
debhelper 12.3, for which we add an explicit versioned Build-Depends.
* Use correct syscall numbers for x32 port.

-- Guillem Jover <guillem@debian.org> Mon, 30 Mar 2020 04:50:14 +0200

Expand Down
29 changes: 16 additions & 13 deletions debian/patches/00_arches_x32.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Description: Add support for x32 (from the Yocto project)
Author: Daniel Schepler <dschepler@gmail.com>
Description: Add support for x32
Author:
Guillem Jover <guillem@debian.org>
Daniel Schepler <dschepler@gmail.com>
Origin: vendor
Forwarded: no
Bug-Debian: 702183
Last-Update: 2013-05-06
Last-Update: 2020-04-11


---
Expand All @@ -13,21 +15,22 @@ Last-Update: 2013-05-06

--- a/src/syscall-x86_64.h
+++ b/src/syscall-x86_64.h
@@ -1,5 +1,15 @@
+#ifndef __NR_io_setup
@@ -1,6 +1,16 @@
+#if __ILP32__
+#define __X32_SYSCALL_BIT 0x40000000
+#define __NR_io_setup (__X32_SYSCALL_BIT + 543)
+#define __NR_io_destroy (__X32_SYSCALL_BIT + 207)
+#define __NR_io_submit (__X32_SYSCALL_BIT + 544)
+#define __NR_io_cancel (__X32_SYSCALL_BIT + 210)
+#define __NR_io_getevents (__X32_SYSCALL_BIT + 208)
+#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333)
+#else
#define __NR_io_setup 206
+#endif
+#ifndef __NR_io_destroy
#define __NR_io_destroy 207
+#endif
+#ifndef __NR_io_getevents
#define __NR_io_getevents 208
+#endif
+#ifndef __NR_io_submit
#define __NR_io_submit 209
+#endif
+#ifndef __NR_io_cancel
#define __NR_io_cancel 210
#define __NR_io_pgetevents 333
+#endif
--- a/harness/main.c
+++ b/harness/main.c
Expand Down

0 comments on commit bfab85b

Please sign in to comment.