I started studying POSIX timers, so I started also doing some exercises, but I immediately had some problems with the compiler. When compiling this code, I get some strange
If you are using -std=c99
you need to tell gcc you're still using recent versions of POSIX:
#define _POSIX_C_SOURCE 199309L
before any #include
, or even with -D
on the command line.
Other errors:
#include
timer_create
, i.e. &sigeventStruct
instead of just sigeventStruct