The coreutils 8.21 build expects that the stat.h file has more macros than the X/Open standard specifies.
http://pubs.opengroup.org/onlinepubs/009695299/basedefs/sys/stat.h.html
Work around is to provide them in the config.h or a file that the config.h includes:
#ifndef S_IXUGO #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #ifndef S_IRWXUGO #define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif #ifndef S_ISNAM #define S_ISNAM (0) #endif #ifndef S_ISNAM #define S_ISNAM (0) #endif #ifndef S_ISCTG #define S_ISCTG(p) (0) #endif #ifndef S_ISDOOR #define S_ISDOOR(p) (0) #endif #ifndef S_ISMPX #define S_ISMPX(p) (0) #endif #ifndef S_ISMPB #define S_ISMPB(p) (0) #endif #ifndef S_ISMPC #define S_ISMPC(p) (0) #endif #ifndef S_ISNWK #define S_ISNWK(p) (0) #endif #ifndef S_ISPORT #define S_ISPORT(p) (0) #endif #ifndef S_ISWHT #define S_ISWHT(p) (0) #endif #ifndef S_TYPEISSHM #define S_TYPEISSHM(p) (0) #endif #ifndef S_TYPEISMQ #define S_TYPEISMQ(p) (0) #endif #ifndef S_TYPEISSEM #define S_TYPEISSEM(p) (0) #endif #ifndef UTIME_NOW #define UTIME_NOW (-1) #endif #ifndef UTIME_OMIT #define UTIME_OMIT (-2)
Diff: