Whamcloud - gitweb
LU-12625 build: reliable detection of struct timespec64 75/35675/9
authorAlexey Zhuravlev <bzzz@whamcloud.com>
Fri, 2 Aug 2019 09:16:22 +0000 (12:16 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 Oct 2019 23:57:00 +0000 (23:57 +0000)
existing configure check define struct inode on stack and this
may cause the following error with gcc8:
build/conftest.c: In function main
build/conftest.c:226:1: error: the frame size of 1032 bytes is
larger than 1024 bytes [-Werror=frame-larger-than=]
which result in false result of the ckeck and then osd-ldiskfs
doesn't build.

put struct inode * on the stack instead.

Change-Id: If31cfd13836e36ef59d428d3c05bf7f51319f89b
Signed-off-by: Alexey Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35675
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4

index 3dc3537..0af9f26 100644 (file)
@@ -2846,10 +2846,10 @@ LB_CHECK_COMPILE([if inode timestamps are struct timespec64],
 inode_timespec64, [
        #include <linux/fs.h>
 ],[
-       struct inode inode = {};
+       struct inode *inode = NULL;
        struct timespec64 ts = {};
 
-       inode.i_atime = timespec64_trunc(ts, 1);
+       inode->i_atime = timespec64_trunc(ts, 1);
        (void)inode;
 ],[
        AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,