add _DEFAULT_SOURCE wherever _BSD_SOURCE was used
[libc-test] / src / functional / clock_gettime.c
1 #include <time.h>
2 #include <errno.h>
3 #include <string.h>
4 #include "test.h"
5
6 #define TEST(c, ...) \
7         ( (c) || (t_error(#c " failed: " __VA_ARGS__),0) )
8
9 int main()
10 {
11         struct timespec ts;
12         TEST(clock_gettime(CLOCK_REALTIME, &ts) == 0 && errno == 0, "%s\n", strerror(errno));
13         return t_status;
14 }