[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v4 1/9] lib/nolibc: Add type definitions for timer support



Add missing type definition for timer support with nolibc.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
---
 lib/nolibc/include/nolibc-internal/shareddefs.h | 15 +++++++++++++++
 lib/nolibc/include/sys/select.h                 |  6 ++++++
 lib/nolibc/include/sys/types.h                  |  4 ++++
 3 files changed, 25 insertions(+)

diff --git a/lib/nolibc/include/nolibc-internal/shareddefs.h 
b/lib/nolibc/include/nolibc-internal/shareddefs.h
index 9b81fab..8b953c2 100644
--- a/lib/nolibc/include/nolibc-internal/shareddefs.h
+++ b/lib/nolibc/include/nolibc-internal/shareddefs.h
@@ -65,6 +65,11 @@ typedef __off off_t;
 #define __DEFINED_off_t
 #endif
 
+#if (defined __NEED_sigset_t && !defined __DEFINED_sigset_t)
+typedef unsigned long sigset_t;
+#define __DEFINED_sigset_t
+#endif
+
 #if (defined __NEED_time_t && !defined __DEFINED_time_t)
 typedef long time_t;
 #define __DEFINED_time_t
@@ -90,3 +95,13 @@ struct timespec {
 };
 #define __DEFINED_struct_timespec
 #endif
+
+#if (defined __NEED_clockid_t && !defined __DEFINED_clockid_t)
+typedef unsigned long clockid_t;
+#define __DEFINED_clockid_d
+#endif
+
+#if (defined __NEED_timer_t && !defined __DEFINED_timer_t)
+typedef unsigned long timer_t;
+#define __DEFINED_timer_t
+#endif
diff --git a/lib/nolibc/include/sys/select.h b/lib/nolibc/include/sys/select.h
index e2bc70d..01ca905 100644
--- a/lib/nolibc/include/sys/select.h
+++ b/lib/nolibc/include/sys/select.h
@@ -36,6 +36,12 @@
 extern "C" {
 #endif
 
+#define __NEED_time_t
+#define __NEED_suseconds_t
+#define __NEED_sigset_t
+#define __NEED_struct_timespec
+#include <nolibc-internal/shareddefs.h>
+
 typedef unsigned long __fd_mask;
 
 /*
diff --git a/lib/nolibc/include/sys/types.h b/lib/nolibc/include/sys/types.h
index 9908855..f2b6633 100644
--- a/lib/nolibc/include/sys/types.h
+++ b/lib/nolibc/include/sys/types.h
@@ -46,6 +46,10 @@ extern "C" {
 #define __NEED_size_t
 #define __NEED_ssize_t
 #define __NEED_off_t
+#define __NEED_time_t
+#define __NEED_suseconds_t
+#define __NEED_clockid_t
+#define __NEED_timer_t
 #include <nolibc-internal/shareddefs.h>
 
 #ifdef __cplusplus
-- 
2.18.0


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.