I\'m getting this warning: (-std=c99 -pedantic)
-std=c99 -pedantic
warning: implicit declaration of function ‘strndup’ [-Wimplicit-function-declaration]
This happened to me, and I added #define _XOPEN_SOURCE 500 and the warning went away.
#define _XOPEN_SOURCE 500