File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 4040#include < errno.h>
4141#endif
4242
43+ #if defined __has_include
44+ # if __has_include (<sys/stat.h>)
45+ # include < sys/stat.h>
46+ # define HAVE_SYS_STAT_H
47+ # endif
48+ #endif
49+
4350/* We can get the following standard types from sys/types for gcc, but we
4451 * need to define the types ourselves for the other compilers that normally
4552 * target embedded systems */
@@ -495,6 +502,8 @@ typedef struct Dir DIR;
495502#define S_IWOTH 0000002 // /< write permission, other
496503#define S_IXOTH 0000001 // /< execute/search permission, other
497504
505+ #ifndef HAVE_SYS_STAT_H
506+
498507/* Refer to sys/stat standard
499508 * Note: Not all fields may be supported by the underlying filesystem
500509 */
@@ -514,6 +523,8 @@ struct stat {
514523 time_t st_ctime; // /< Time of last status change
515524};
516525
526+ #endif
527+
517528struct statvfs {
518529 unsigned long f_bsize; // /< Filesystem block size
519530 unsigned long f_frsize; // /< Fragment size (block size)
You can’t perform that action at this time.
0 commit comments