public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-libbpf-sys] f44: Add __u128 to linux/types.h to fix build on aarch64
@ 2026-10-15 22:17 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-10-15 22:17 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rust-libbpf-sys
Branch : f44
Commit : bbfb63972b2409d6f5917fc2e0c7356bf23140df
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date   : 2026-10-15T16:53:28-04:00
Stats  : +37/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-libbpf-sys/c/bbfb63972b2409d6f5917fc2e0c7356bf23140df?branch=f44

Log:
Add __u128 to linux/types.h to fix build on aarch64

---
diff --git a/0001-libbpf-include-add-128-bit-integer-types.patch b/0001-libbpf-include-add-128-bit-integer-types.patch
new file mode 100644
index 0000000..932fda7
--- /dev/null
+++ b/0001-libbpf-include-add-128-bit-integer-types.patch
@@ -0,0 +1,35 @@
+From f90a9c487d7542d91fa584b83b6a624a4fbeb341 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Mon, 7 Sep 2026 16:54:26 +0100
+Subject: [PATCH] include: add 128-bit integer types to linux/types.h
+
+Linux 7.3 declares the fpsimd registers in the arm64 sigcontext as
+__u128 instead of __uint128_t, see kernel commit d4bf9e08d412 ("arm64:
+uapi: Use __u128 instead of __uint128_t in UAPI headers"). The private
+linux/types.h in include/ shadows the kernel's linux/types.h while
+building libbpf, so with glibc, whose signal.h pulls in
+asm/sigcontext.h, the build fails with an unknown type name __u128.
+Add the __s128 and __u128 typedefs as the kernel's uapi and tools
+headers define them.
+
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+---
+ include/linux/types.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libbpf/include/linux/types.h b/libbpf/include/linux/types.h
+index cfb558ac3..3560e9539 100644
+--- a/libbpf/include/linux/types.h
++++ b/libbpf/include/linux/types.h
+@@ -12,6 +12,11 @@
+ #include <asm/types.h>
+ #include <asm/posix_types.h>
+ 
++#ifdef __SIZEOF_INT128__
++typedef __signed__ __int128 __s128 __attribute__((aligned(16)));
++typedef unsigned __int128 __u128 __attribute__((aligned(16)));
++#endif
++
+ #define __bitwise__
+ #define __bitwise __bitwise__
+ 

diff --git a/rust-libbpf-sys.spec b/rust-libbpf-sys.spec
index 27b53bf..b664cd6 100644
--- a/rust-libbpf-sys.spec
+++ b/rust-libbpf-sys.spec
@@ -15,6 +15,8 @@ URL:            https://crates.io/crates/libbpf-sys
 Source:         %{crates_source %{crate} %{crate_version}}
 # Automatically generated patch to strip dependencies and normalize metadata
 Patch:          libbpf-sys-fix-metadata-auto.diff
+# https://bugzilla.redhat.com/show_bug.cgi?id=2527141
+Patch:          0001-libbpf-include-add-128-bit-integer-types.patch
 
 BuildRequires:  cargo-rpm-macros >= 24
 BuildRequires:  elfutils-libelf-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-15 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15 22:17 [rpms/rust-libbpf-sys] f44: Add __u128 to linux/types.h to fix build on aarch64 Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox