]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - libio/tst-atime.c
Fix libio/tst-atime not to presume ST_NOATIME exists.
[thirdparty/glibc.git] / libio / tst-atime.c
index 0b0b4f04c4716b38c66c413165b82501eec09c99..31ca59fec571bbff55e2d97c486517d5ad415cdb 100644 (file)
@@ -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)