From 7ccacc7385d103b79361a32eba356459474475b8 Mon Sep 17 00:00:00 2001 From: jofrev Date: Thu, 8 Dec 2022 22:29:01 +0000 Subject: [PATCH] Set errno in adjtime if newlib time funcs are not implemented Other time functions (e.g. settimeofday) set errno to ENOSYS if IMPL_NEWLIB_TIME_FUNCS is not set. adjtime should probably do the same. --- components/newlib/time.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/newlib/time.c b/components/newlib/time.c index a021d15eee..22960ab933 100644 --- a/components/newlib/time.c +++ b/components/newlib/time.c @@ -153,6 +153,7 @@ int adjtime(const struct timeval *delta, struct timeval *outdelta) } return 0; #else + errno = ENOSYS; return -1; #endif }