From b65c0ff9fc84ca9531215e03a4c4e51092f9251f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 6 Feb 2015 12:24:16 -0800 Subject: Fix libio/tst-atime not to presume ST_NOATIME exists. --- libio/tst-atime.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libio') diff --git a/libio/tst-atime.c b/libio/tst-atime.c index 0b0b4f04c4..31ca59fec5 100644 --- a/libio/tst-atime.c +++ b/libio/tst-atime.c @@ -23,8 +23,6 @@ do_test (void) int ch; struct stat st1; struct stat st2; - struct statvfs sv; - int e; buf = (char *) malloc (strlen (test_dir) + sizeof "/tst-atime.XXXXXX"); if (buf == NULL) @@ -44,7 +42,8 @@ do_test (void) #ifdef ST_NOATIME /* Make sure the filesystem doesn't have the noatime option set. If statvfs is not available just continue. */ - e = fstatvfs (fd, &sv); + struct statvfs sv; + int e = fstatvfs (fd, &sv); if (e != ENOSYS) { if (e != 0) -- cgit 1.4.1