diff options
author | alaviss <[email protected]> | 2020-05-04 22:25:48 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-04 15:25:48 -0700 |
commit | 3e5d41d807b03e5f43afe3d859735b845c905f5f (patch) | |
tree | 078766da005bebea13204a9f878543c0aee85d19 /config/kernel-inode-times.m4 | |
parent | 6f3e1a48287f3d93a78668cb24cf4a2fb12991cd (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
Diffstat (limited to 'config/kernel-inode-times.m4')
-rw-r--r-- | config/kernel-inode-times.m4 | 1 |
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); ]) |