Fix mbed_retarget.h stub on Mac OS.

Some parts of the stat structure are already defined by the system as macros.
The solution is to disable them. If these members are necessary for unit test,
a deeper integration is required, the best being to use the native structure.
pull/14254/head
Vincent Coubard 2021-02-09 13:48:44 +00:00
parent 164bb83274
commit 26b40e7279
1 changed files with 8 additions and 0 deletions

View File

@ -374,9 +374,17 @@ struct stat {
off_t st_size; ///< Size of file in bytes
// st_atime, st_mtime and st_ctime are defined as macros
// on platform like iOS.
#ifndef st_atime
time_t st_atime; ///< Time of last access
#endif
#ifndef st_mtime
time_t st_mtime; ///< Time of last data modification
#endif
#ifndef st_ctime
time_t st_ctime; ///< Time of last status change
#endif
};
#endif