From 3e5d41d807b03e5f43afe3d859735b845c905f5f 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 8a79c299e..9c016c790 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); ])