From cce3e4420bd897bee235a794b9ddd2482a7752ea Mon Sep 17 00:00:00 2001 From: alaviss Date: Mon, 4 May 2020 22:25:48 +0000 Subject: [PATCH] config/kernel-inode-times: initialize timespec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Hiếu Lê Closes #10279 Closes #10281 --- config/kernel-inode-times.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/config/kernel-inode-times.m4 b/config/kernel-inode-times.m4 index 8a79c299e1a3..9c016c790081 100644 --- a/config/kernel-inode-times.m4 +++ b/config/kernel-inode-times.m4 @@ -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); ])