#include <time.h>
struct timespec first_tm1;
int ts_compare(struct timespec *time1, struct timespec *time2)
{
if (time1->tv_sec < time2->tv_sec)
return -1; /* Less than. */
}
It gives the following :
Error C2079 'first_tm1' uses undefined struct 'timespec'
Error C2037 left of 'tv_sec' specifies undefined struct/union 'timespec'