Fix sys/stat.h issue for unit tests on macOS

pull/14402/head
Ladislas de Toldi 2021-03-10 10:41:31 +01:00
parent 0e89f9d6d9
commit 6335775c58
No known key found for this signature in database
GPG Key ID: C5241848279CD797
1 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,14 @@
#include <time.h>
#if defined __has_include
# if __has_include (<sys/stat.h>)
# include <sys/stat.h>
# define HAVE_SYS_STAT_H
# endif
#endif
namespace mbed {
#define NAME_MAX 255
@ -362,7 +370,7 @@ namespace mbed {
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#ifndef _STAT_VER
#ifndef HAVE_SYS_STAT_H
struct stat {
dev_t st_dev; ///< Device ID containing file
ino_t st_ino; ///< File serial number