[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/NEWLIB PATCH 3/5] Provide our own <timespec.h> and <_timespec.h> headers
Newlib uses <timespec.h> and <_timespec.h> headers for defining itimerspec and timespec types, respectively. However, these definitions are not protected with preprocessing guards in case they were previously defined, which happens for us because we define these types in uktime internal lib. Therefore the solution is to skip using newlib's headers and provide our own. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- include/sys/_timespec.h | 6 ++++++ include/sys/timespec.h | 6 ++++++ include/uk/_timespec.h | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 include/sys/_timespec.h create mode 100644 include/sys/timespec.h create mode 100644 include/uk/_timespec.h diff --git a/include/sys/_timespec.h b/include/sys/_timespec.h new file mode 100644 index 0000000..4be97c0 --- /dev/null +++ b/include/sys/_timespec.h @@ -0,0 +1,6 @@ +#ifndef __NEWLIB_GLUE_SYS__TIMESPEC_H__ +#define __NEWLIB_GLUE_SYS__TIMESPEC_H__ + +#include <uk/_timespec.h> + +#endif /* __NEWLIB_GLUE_SYS__TIMESPEC_H__ */ diff --git a/include/sys/timespec.h b/include/sys/timespec.h new file mode 100644 index 0000000..bb42c17 --- /dev/null +++ b/include/sys/timespec.h @@ -0,0 +1,6 @@ +#ifndef __NEWLIB_GLUE_SYS_TIMESPEC_H__ +#define __NEWLIB_GLUE_SYS_TIMESPEC_H__ + +#include <uk/_timespec.h> + +#endif /* __NEWLIB_GLUE_SYS_TIMESPEC_H__ */ diff --git a/include/uk/_timespec.h b/include/uk/_timespec.h new file mode 100644 index 0000000..701ade6 --- /dev/null +++ b/include/uk/_timespec.h @@ -0,0 +1,11 @@ +#ifndef __NEWLIB_GLUE_UK__TIMESPEC_H__ +#define __NEWLIB_GLUE_UK__TIMESPEC_H__ + +#define __NEED_time_t +#define __NEED_struct_timespec +#include <uk/time_types.h> + +/* newlib guards */ +#define __time_t_defined + +#endif /* __NEWLIB_GLUE_UK__TIMESPEC_H__ */ -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |