Package: gfs2-utils Version: 3.6.1-2 Severity: important Tags: patch ftbfs User: [email protected] Usertags: origin-ubuntu stonking
Dear Maintainer, gfs2-utils fails to build from source on arm64: /usr/include/aarch64-linux-gnu/asm/sigcontext.h:81:9: error: unknown type name '__u128'; did you mean '__u32'? Root cause: gfs2-utils provides an internal compatibility header gfs2/include/linux/types.h which is exposed via -I compiler flags. When source files in gfs2/edit (extended.c, journal.c, hexedit.c) include <signal.h>, glibc's <bits/sigcontext.h> includes the kernel UAPI header <asm/sigcontext.h>, which in turn includes <linux/types.h>. Due to the include path order, the compiler includes the internal gfs2/include/linux/types.h instead of system /usr/include/linux/types.h. The internal header only defines endian types (__le16 through __be64) and lacks the 128-bit kernel integer types (__s128 and __u128) used by arm64's struct fpsimd_context. Fix: Define __s128 and __u128 under #ifdef __SIZEOF_INT128__ in gfs2/include/linux/types.h. Patch is attached below. --- a/gfs2/include/linux/types.h +++ b/gfs2/include/linux/types.h @@ -24,4 +24,9 @@ typedef uint64_t __bitwise __le64; typedef uint64_t __bitwise __be64; +#ifdef __SIZEOF_INT128__ +typedef __signed__ __int128 __s128 __attribute__((aligned(16))); +typedef unsigned __int128 __u128 __attribute__((aligned(16))); +#endif + #endif /* LINUX_TYPES_H */
--- a/gfs2/include/linux/types.h +++ b/gfs2/include/linux/types.h @@ -24,4 +24,9 @@ typedef uint64_t __bitwise __le64; typedef uint64_t __bitwise __be64; +#ifdef __SIZEOF_INT128__ +typedef __signed__ __int128 __s128 __attribute__((aligned(16))); +typedef unsigned __int128 __u128 __attribute__((aligned(16))); +#endif + #endif /* LINUX_TYPES_H */

