Package: libaio-dev
Version: 0.3.110-5
Severity: normal
Tags: patch

Dear Maintainer,

libaio doesn't work in x32 mode because the include file incorrectly
identifies it as 64-bit architecture and uses incorrect padding.

The bug is already fixed in the upstream git. See this patch.

Note, that because the bug is in the include file, you need to rebuild
all packages that depend on libaio to fix it.

--- /usr/include/libaio.h_      2017-12-09 05:55:10.168200000 +0100
+++ /usr/include/libaio.h       2017-12-09 06:01:33.718200000 +0100
@@ -54,7 +54,9 @@
     (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
     defined(__bfin__) || \
     (defined(__MIPSEL__) && !defined(__mips64)) || \
-    defined(__cris__)
+    defined(__cris__) || \
+    (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
+         __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
 #define PADDED(x, y)   x; unsigned y
 #define PADDEDptr(x, y)        x; unsigned y
 #define PADDEDul(x, y) unsigned long x; unsigned y


-- System Information:
Debian Release: buster/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, x32

Kernel: Linux 4.15.0-rc2 (SMP w/12 CPU cores; PREEMPT)
Locale: LANG=cs_CZ.utf8, LC_CTYPE=cs_CZ.utf8 (charmap=UTF-8), 
LANGUAGE=cs_CZ.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages libaio-dev depends on:
ii  libaio1  0.3.110-5

libaio-dev recommends no packages.

libaio-dev suggests no packages.

-- no debconf information
--- /usr/include/libaio.h_      2017-12-09 05:55:10.168200000 +0100
+++ /usr/include/libaio.h       2017-12-09 06:01:33.718200000 +0100
@@ -54,7 +54,9 @@
     (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
     defined(__bfin__) || \
     (defined(__MIPSEL__) && !defined(__mips64)) || \
-    defined(__cris__)
+    defined(__cris__) || \
+    (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
+         __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
 #define PADDED(x, y)   x; unsigned y
 #define PADDEDptr(x, y)        x; unsigned y
 #define PADDEDul(x, y) unsigned long x; unsigned y

Reply via email to