]> git.proxmox.com Git - mirror_zfs.git/commitdiff
config/kernel-inode-times: initialize timespec
authoralaviss <leorize+oss@disroot.org>
Mon, 4 May 2020 22:25:48 +0000 (22:25 +0000)
committerGitHub <noreply@github.com>
Mon, 4 May 2020 22:25:48 +0000 (15:25 -0700)
Usage of this variable uninitialized triggers -Werror,-Wuninitialized
when compiled under clang for linux kernel 5.6, leading the build system
to believe that the function is not declared.

This commit initializes the variable to suppress the warning and fix the
build for kernel 5.6 with clang.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
Closes #10279
Closes #10281

config/kernel-inode-times.m4

index 8a79c299e1a3d43cb4d91501b3b5f53ba94fb7ea..9c016c790081567c1895e8ce93930ea8076c9688 100644 (file)
@@ -10,6 +10,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
                struct timespec64 ts;
                struct inode ip;
 
+               memset(&ts, 0, sizeof(ts));
                ts = timestamp_truncate(ts, &ip);
        ])