public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bpftool] rawhide: Update bundled linux/types.h headers for __u128
@ 2026-10-15 22:20 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-10-15 22:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/bpftool
Branch : rawhide
Commit : f0a74d764a0dbfa3c4ff14f5f46d620cb596ea26
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-10-14T12:08:56-04:00
Stats : +72/-0 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/bpftool/c/f0a74d764a0dbfa3c4ff14f5f46d620cb596ea26?branch=rawhide
Log:
Update bundled linux/types.h headers for __u128
https://bugzilla.redhat.com/show_bug.cgi?id=2527141
---
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/0002-include-add-u128-to-linux-types.h.patch b/0002-include-add-u128-to-linux-types.h.patch
new file mode 100644
index 0000000..f3423ff
--- /dev/null
+++ b/0002-include-add-u128-to-linux-types.h.patch
@@ -0,0 +1,32 @@
+From e51a4fe89dfcff3fc7f2143cb0d829c09c7b3145 Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowi@redhat.com>
+Date: Wed, 14 Oct 2026 11:10:27 -0400
+Subject: [PATCH] include: add u128 to linux/types.h
+
+This corresponds to kernel commit 224d80c584d3016cb8d83d1c33914fdd3508aa8c,
+and is necessary for building on aarch64 with latest kernel UAPI headers.
+
+Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
+---
+ include/linux/types.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/include/linux/types.h b/include/linux/types.h
+index d2df5ed..f5ee0ed 100644
+--- a/include/linux/types.h
++++ b/include/linux/types.h
+@@ -10,6 +10,11 @@
+ #include <asm/types.h>
+ #include <asm/posix_types.h>
+
++#ifdef __SIZEOF_INT128__
++typedef unsigned __int128 __u128 __attribute__((aligned(16)));
++typedef __u128 u128;
++#endif
++
+ typedef uint64_t u64;
+ typedef __u32 u32;
+ typedef __u16 u16;
+--
+2.56.0
+
diff --git a/bpftool.spec b/bpftool.spec
index b99dba2..9752f01 100644
--- a/bpftool.spec
+++ b/bpftool.spec
@@ -10,6 +10,11 @@ License: GPL-2.0-only OR BSD-2-Clause
URL: https://github.com/libbpf/bpftool
Source: https://github.com/libbpf/bpftool/releases/download/v%{version}/%{sources}.tar.gz
+# https://github.com/libbpf/libbpf/pull/982, included in libbpf-1.8.0
+Patch: 0001-libbpf-include-add-128-bit-integer-types.patch
+# https://github.com/libbpf/bpftool/pull/297
+Patch: 0002-include-add-u128-to-linux-types.h.patch
+
ExcludeArch: %{ix86}
BuildRequires: gcc
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-15 22:20 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:20 [rpms/bpftool] rawhide: Update bundled linux/types.h headers for __u128 Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox