lib/libc/min: Handle duplicate time definitions
time_t and suseconds_t are defined in time.h and sys/types.h. Handle the duplication by adding ifdef protection around them similar to what is being done for other types. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
b711c1efad
commit
daf9f11024
2 changed files with 14 additions and 0 deletions
|
@ -42,8 +42,15 @@ typedef int off_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__time_t_defined)
|
||||||
|
#define __time_t_defined
|
||||||
typedef int64_t time_t;
|
typedef int64_t time_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__suseconds_t_defined)
|
||||||
|
#define __suseconds_t_defined
|
||||||
typedef int32_t suseconds_t;
|
typedef int32_t suseconds_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(__mem_word_t_defined)
|
#if !defined(__mem_word_t_defined)
|
||||||
#define __mem_word_t_defined
|
#define __mem_word_t_defined
|
||||||
|
|
|
@ -31,8 +31,15 @@ struct tm {
|
||||||
int tm_isdst;
|
int tm_isdst;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !defined(__time_t_defined)
|
||||||
|
#define __time_t_defined
|
||||||
typedef int64_t time_t;
|
typedef int64_t time_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__suseconds_t_defined)
|
||||||
|
#define __suseconds_t_defined
|
||||||
typedef int32_t suseconds_t;
|
typedef int32_t suseconds_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/_timespec.h>
|
#include <sys/_timespec.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue