[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH] lib/nolibc: Imply uktime for time functions
We choose to _imply_ uktime in order to support time functions transparently. When configurating, the user will have the option to disable uktime in order to build a minimal nolibc. This patch introduces a new feature flag, HAVE_TIME, which indicates whether time-related functions are enabled. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- lib/Config.uk | 4 ++++ lib/nolibc/Config.uk | 1 + lib/nolibc/include/nolibc-internal/shareddefs.h | 2 ++ lib/uktime/Config.uk | 1 + 4 files changed, 8 insertions(+) diff --git a/lib/Config.uk b/lib/Config.uk index 44311de3..7565257d 100644 --- a/lib/Config.uk +++ b/lib/Config.uk @@ -13,6 +13,10 @@ config HAVE_LIBC bool default n +config HAVE_TIME + bool + default n + config HAVE_SCHED bool default n diff --git a/lib/nolibc/Config.uk b/lib/nolibc/Config.uk index a81aaece..0b7e8025 100644 --- a/lib/nolibc/Config.uk +++ b/lib/nolibc/Config.uk @@ -2,6 +2,7 @@ menuconfig LIBNOLIBC bool "nolibc: Only neccessary subset of libc functionality" depends on !HAVE_LIBC default y if !HAVE_LIBC + imply LIBUKTIME if LIBNOLIBC config LIBNOLIBC_UKDEBUG_ASSERT diff --git a/lib/nolibc/include/nolibc-internal/shareddefs.h b/lib/nolibc/include/nolibc-internal/shareddefs.h index a1661081..27e01294 100644 --- a/lib/nolibc/include/nolibc-internal/shareddefs.h +++ b/lib/nolibc/include/nolibc-internal/shareddefs.h @@ -65,7 +65,9 @@ typedef __off off_t; #define __DEFINED_off_t #endif +#if CONFIG_HAVE_TIME #include <uk/time_types.h> +#endif #if (defined __NEED_mode_t && !defined __DEFINED_mode_t) typedef unsigned mode_t; diff --git a/lib/uktime/Config.uk b/lib/uktime/Config.uk index 1c634f27..1892c4ef 100644 --- a/lib/uktime/Config.uk +++ b/lib/uktime/Config.uk @@ -1,3 +1,4 @@ config LIBUKTIME bool "uktime: Time functions" default n + select HAVE_TIME -- 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 |