public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-libbpf-sys] f43: Add __u128 to linux/types.h to fix build on aarch64
Date: Thu, 15 Oct 2026 22:25:28 GMT	[thread overview]
Message-ID: <179210312867.1.3137021821360482111.rpms-rust-libbpf-sys-bbfb63972b24@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rust-libbpf-sys
Branch : f43
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=f43

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

                 reply	other threads:[~2026-10-15 22:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179210312867.1.3137021821360482111.rpms-rust-libbpf-sys-bbfb63972b24@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox