diff options
author | Roland McGrath <roland@hack.frob.com> | 2015-02-06 12:24:16 -0800 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2015-02-06 12:24:16 -0800 |
commit | b65c0ff9fc84ca9531215e03a4c4e51092f9251f (patch) | |
tree | 0424610330c47c701733e4affdbdd60a97c8a16d | |
parent | 56606ab3b8d5b097b7c4f09b52b79a2217768ca4 (diff) | |
download | glibc-b65c0ff9fc84ca9531215e03a4c4e51092f9251f.tar.gz glibc-b65c0ff9fc84ca9531215e03a4c4e51092f9251f.tar.xz glibc-b65c0ff9fc84ca9531215e03a4c4e51092f9251f.zip |
Fix libio/tst-atime not to presume ST_NOATIME exists.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | libio/tst-atime.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 28bc618987..47f698f575 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-02-06 Roland McGrath <roland@hack.frob.com> + * libio/tst-atime.c (do_test): Move local variables SV and E + inside [ST_NOATIME] conditional. + * dirent/tst-fdopendir.c (O_NOATIME): If not defined, #define to 0. * nptl/tst-kill5.c (do_test): Use INT_MAX rather than SIGRTMAX + 10. 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) |