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 ...
I resolved this by changing the C standard that I was using with gcc.
I changed: gcc -std=c99 ...
gcc -std=c99 ...
to this: gcc -std=gnu99 ...
gcc -std=gnu99 ...