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

[Minios-devel] [UNIKRAFT PATCH v2 1/2] lib/nolibc: Guard sleep prototype with HAVE_TIME



Guarded sleep() prototype in NOLIBC with HAVE_TIME,
as sleep() depends on HAVE_TIME and better to have
an undefined function than a linker error.

Signed-off-by: Santiago Pagani <santiago.pagani@xxxxxxxxx>
---
 lib/nolibc/include/unistd.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/nolibc/include/unistd.h b/lib/nolibc/include/unistd.h
index a6986873..e6854e25 100644
--- a/lib/nolibc/include/unistd.h
+++ b/lib/nolibc/include/unistd.h
@@ -55,7 +55,9 @@ extern "C" {
 
 #include <nolibc-internal/shareddefs.h>
 
+#if CONFIG_HAVE_TIME
 unsigned int sleep(unsigned int seconds);
+#endif
 
 #if CONFIG_LIBVFSCORE
 int close(int fd);
-- 
2.17.1


_______________________________________________
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®.