GCC with -std=c99 complains about not knowing struct timespec
Explicitly enabling POSIX features The timespec comes from POSIX, so you have to ‘enable’ POSIX definitions: #if __STDC_VERSION__ >= 199901L #define _XOPEN_SOURCE 600 #else #define _XOPEN_SOURCE 500 #endif /* __STDC_VERSION__ */ #include <time.h> void blah(struct timespec asdf) { } int main() { struct timespec asdf; return 0; } The stanza at the top is what … Read more