mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12607 from facchinm/sys_stat_h_inclusion
Use toolchain's struct stat if availablepull/12643/head
commit
4f45b95ca3
|
@ -40,6 +40,13 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined __has_include
|
||||||
|
# if __has_include (<sys/stat.h>)
|
||||||
|
# include <sys/stat.h>
|
||||||
|
# define HAVE_SYS_STAT_H
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We can get the following standard types from sys/types for gcc, but we
|
/* We can get the following standard types from sys/types for gcc, but we
|
||||||
* need to define the types ourselves for the other compilers that normally
|
* need to define the types ourselves for the other compilers that normally
|
||||||
* target embedded systems */
|
* target embedded systems */
|
||||||
|
@ -495,6 +502,8 @@ typedef struct Dir DIR;
|
||||||
#define S_IWOTH 0000002 ///< write permission, other
|
#define S_IWOTH 0000002 ///< write permission, other
|
||||||
#define S_IXOTH 0000001 ///< execute/search permission, other
|
#define S_IXOTH 0000001 ///< execute/search permission, other
|
||||||
|
|
||||||
|
#ifndef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
/* Refer to sys/stat standard
|
/* Refer to sys/stat standard
|
||||||
* Note: Not all fields may be supported by the underlying filesystem
|
* Note: Not all fields may be supported by the underlying filesystem
|
||||||
*/
|
*/
|
||||||
|
@ -514,6 +523,8 @@ struct stat {
|
||||||
time_t st_ctime; ///< Time of last status change
|
time_t st_ctime; ///< Time of last status change
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
struct statvfs {
|
struct statvfs {
|
||||||
unsigned long f_bsize; ///< Filesystem block size
|
unsigned long f_bsize; ///< Filesystem block size
|
||||||
unsigned long f_frsize; ///< Fragment size (block size)
|
unsigned long f_frsize; ///< Fragment size (block size)
|
||||||
|
|
Loading…
Reference in New Issue