include <sys/stat.h> instead of defining a 'struct stat'; this prevents