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:
Kumar Gala 2019-08-06 15:43:38 -05:00 committed by Andrew Boie
commit daf9f11024
2 changed files with 14 additions and 0 deletions

View file

@ -42,8 +42,15 @@ typedef int off_t;
#endif
#if !defined(__time_t_defined)
#define __time_t_defined
typedef int64_t time_t;
#endif
#if !defined(__suseconds_t_defined)
#define __suseconds_t_defined
typedef int32_t suseconds_t;
#endif
#if !defined(__mem_word_t_defined)
#define __mem_word_t_defined

View file

@ -31,8 +31,15 @@ struct tm {
int tm_isdst;
};
#if !defined(__time_t_defined)
#define __time_t_defined
typedef int64_t time_t;
#endif
#if !defined(__suseconds_t_defined)
#define __suseconds_t_defined
typedef int32_t suseconds_t;
#endif
#include <sys/_timespec.h>