mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
sys-fs/zfs-kmod: Fix build with LLVM 21
Provide a patch which fixes the bdev interface detection by fixing the -Wuninitialized-const-pointer warning from LLVM 21. Closes: https://bugs.gentoo.org/962778 Signed-off-by: Michal Rostecki <vadorovsky@protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43750 Closes: https://github.com/gentoo/gentoo/pull/43750 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
355d2046e2
commit
e5ac9fc753
60
sys-fs/zfs-kmod/files/zfs-kmod-2.3.3-bdev-interface.patch
Normal file
60
sys-fs/zfs-kmod/files/zfs-kmod-2.3.3-bdev-interface.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
From 9acedbaceec362d08a33ebfe7c4c7efcee81d094 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Tue, 2 Sep 2025 09:34:08 -0700
|
||||
Subject: [PATCH] config: Fix LLVM-21 -Wuninitialized-const-pointer warning
|
||||
|
||||
LLVM-21 enables -Wuninitialized-const-pointer which results in the
|
||||
following compiler warning and the bdev_file_open_by_path() interface
|
||||
not being detected for 6.9 and newer kernels. The blk_holder_ops
|
||||
are not used by the ZFS code so we can safely use a NULL argument
|
||||
for this check.
|
||||
|
||||
bdev_file_open_by_path/bdev_file_open_by_path.c:110:54: error:
|
||||
variable 'h' is uninitialized when passed as a const pointer
|
||||
argument here [-Werror,-Wuninitialized-const-pointer]
|
||||
|
||||
Reviewed-by: Rob Norris <robn@despairlabs.com>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #17682
|
||||
Closes #17684
|
||||
---
|
||||
config/kernel-blkdev.m4 | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/config/kernel-blkdev.m4 b/config/kernel-blkdev.m4
|
||||
index 83190c6fbe3f..02011bf39fb2 100644
|
||||
--- a/config/kernel-blkdev.m4
|
||||
+++ b/config/kernel-blkdev.m4
|
||||
@@ -29,9 +29,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG], [
|
||||
const char *path = "path";
|
||||
fmode_t mode = 0;
|
||||
void *holder = NULL;
|
||||
- struct blk_holder_ops h;
|
||||
|
||||
- bdev = blkdev_get_by_path(path, mode, holder, &h);
|
||||
+ bdev = blkdev_get_by_path(path, mode, holder, NULL);
|
||||
])
|
||||
])
|
||||
|
||||
@@ -48,9 +47,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH], [
|
||||
const char *path = "path";
|
||||
fmode_t mode = 0;
|
||||
void *holder = NULL;
|
||||
- struct blk_holder_ops h;
|
||||
|
||||
- bdh = bdev_open_by_path(path, mode, holder, &h);
|
||||
+ bdh = bdev_open_by_path(path, mode, holder, NULL);
|
||||
])
|
||||
])
|
||||
|
||||
@@ -68,9 +66,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BDEV_FILE_OPEN_BY_PATH], [
|
||||
const char *path = "path";
|
||||
fmode_t mode = 0;
|
||||
void *holder = NULL;
|
||||
- struct blk_holder_ops h;
|
||||
|
||||
- file = bdev_file_open_by_path(path, mode, holder, &h);
|
||||
+ file = bdev_file_open_by_path(path, mode, holder, NULL);
|
||||
])
|
||||
])
|
||||
|
||||
@@ -61,6 +61,7 @@ PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.1.11-gentoo.patch
|
||||
"${FILESDIR}"/${PN}-2.3.3-bdev-interface.patch
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
|
||||
@@ -61,6 +61,7 @@ PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.1.11-gentoo.patch
|
||||
"${FILESDIR}"/${PN}-2.3.3-bdev-interface.patch
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
|
||||
@@ -61,6 +61,7 @@ PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.1.11-gentoo.patch
|
||||
"${FILESDIR}"/${PN}-2.3.3-bdev-interface.patch
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
|
||||
Reference in New Issue
Block a user