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

[Minios-devel] [UNIKRAFT PATCHv6 36/37] nolibc: Add eerno.h header for time.c


  • To: <minios-devel@xxxxxxxxxxxxxxxxxxxx>, <simon.kuenzer@xxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Fri, 14 Sep 2018 07:57:09 +0000
  • Authentication-results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=bestguesspass action=none header.from=arm.com;
  • Cc: Kaly.Xin@xxxxxxx, nd@xxxxxxx, wei.chen@xxxxxxx
  • Delivery-date: Fri, 14 Sep 2018 07:59:04 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: True
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

If we don't enable the CONFIG_HAVE_SCHED, we should get the error:
nolibc/time.c:65:3: error: ‘errno’ undeclared (first use in this function)
   errno = EINVAL;
   ^~~~~
This because the uk/sched.h include the error.h implicitly. So we
add error.h to the headers.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
 lib/nolibc/time.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/nolibc/time.c b/lib/nolibc/time.c
index 9e3e24e..0467033 100644
--- a/lib/nolibc/time.c
+++ b/lib/nolibc/time.c
@@ -36,6 +36,7 @@
  */
 
 #include <time.h>
+#include <errno.h>
 #include <uk/config.h>
 #if CONFIG_HAVE_SCHED
 #include <uk/sched.h>
-- 
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®.