From bac0a93d6276d1f1b8d2b034361cc69ad87d443b Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Mon, 16 Dec 2019 09:35:03 -0800 Subject: [PATCH] soc: intel_s1000: provide dummy version of _gettimeofday_r() The newlib of XCC requires linking to _gettimeofday_r() which should have been provided by its own C library, but obviously isn't. So we need to provide a dummy version to get past the build error. Signed-off-by: Daniel Leung --- soc/xtensa/intel_s1000/xcc/newlib_fixes.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/soc/xtensa/intel_s1000/xcc/newlib_fixes.c b/soc/xtensa/intel_s1000/xcc/newlib_fixes.c index 311b8bbf15c..d1053b23b40 100644 --- a/soc/xtensa/intel_s1000/xcc/newlib_fixes.c +++ b/soc/xtensa/intel_s1000/xcc/newlib_fixes.c @@ -102,3 +102,12 @@ void *_sbrk_r(struct _reent *r, int count) return _sbrk(count); } + +int _gettimeofday_r(struct _reent *r, struct timeval *__tp, void *__tzp) +{ + ARG_UNUSED(r); + ARG_UNUSED(__tp); + ARG_UNUSED(__tzp); + + return -1; +}