Although including I get an error saying that struct sigaction is an incomplete type.
struct sigaction
I have no Idea what to do with it.>
Just
#define _XOPEN_SOURCE 700
before any other line in your code, or compile with the -D option to define the preprocessor symbol
-D
gcc ... -D_XOPEN_SOURCE=700 ...