[cs631apue] stat timespec vs time_t

afonsec1 afonsec1 at stevens.edu
Sun Nov 20 20:33:21 EST 2011


Professor,

I'm having compiling issues using struct stat.

I include

#include <sys/types.h>
#include <sys/stat.h>

but for some reasons,

the field struct stat.st_mtime of type time_t could not be resolved. 
Rather, st_mtim of type timespec is defined.

timespec has a field named tv_sec of type time_t which I'm assuming it 
gives me the same value that stat.st_mtime will give me.

Is there a macro that will enable st_mtime?

Thanks,

Armando.




More information about the cs631apue mailing list