aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralaviss <[email protected]>2020-05-04 22:25:48 +0000
committerGitHub <[email protected]>2020-05-04 15:25:48 -0700
commit3e5d41d807b03e5f43afe3d859735b845c905f5f (patch)
tree078766da005bebea13204a9f878543c0aee85d19
parent6f3e1a48287f3d93a78668cb24cf4a2fb12991cd (diff)
config/kernel-inode-times: initialize timespec
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 <[email protected]> Signed-off-by: Hiếu Lê <[email protected]> Closes #10279 Closes #10281
-rw-r--r--config/kernel-inode-times.m41
1 files changed, 1 insertions, 0 deletions
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);
])