From d4f616534693127be35a03dff095b7777b0522a5 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 2 Jul 2013 13:32:38 +0200 Subject: [PATCH] test: fix fs_fstat test on sunos The tests are no longer compiled with -D_XOPEN_SOURCE=500 when building with autotools. Tell the test explicitly that SunOS systems are expected to have nanosecond fstat(2) granularity. --- test/test-fs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test-fs.c b/test/test-fs.c index dcc39765..d0f05526 100644 --- a/test/test-fs.c +++ b/test/test-fs.c @@ -951,7 +951,10 @@ TEST_IMPL(fs_fstat) { ASSERT(s->st_birthtim.tv_nsec == t.st_birthtimespec.tv_nsec); ASSERT(s->st_flags == t.st_flags); ASSERT(s->st_gen == t.st_gen); -#elif defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || defined(_XOPEN_SOURCE) +#elif defined(__sun) || \ + defined(_BSD_SOURCE) || \ + defined(_SVID_SOURCE) || \ + defined(_XOPEN_SOURCE) ASSERT(s->st_atim.tv_sec == t.st_atim.tv_sec); ASSERT(s->st_atim.tv_nsec == t.st_atim.tv_nsec); ASSERT(s->st_mtim.tv_sec == t.st_mtim.tv_sec);