mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
164bb83274
commit
26b40e7279
|
@ -374,9 +374,17 @@ struct stat {
|
||||||
|
|
||||||
off_t st_size; ///< Size of file in bytes
|
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
|
time_t st_atime; ///< Time of last access
|
||||||
|
#endif
|
||||||
|
#ifndef st_mtime
|
||||||
time_t st_mtime; ///< Time of last data modification
|
time_t st_mtime; ///< Time of last data modification
|
||||||
|
#endif
|
||||||
|
#ifndef st_ctime
|
||||||
time_t st_ctime; ///< Time of last status change
|
time_t st_ctime; ///< Time of last status change
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue