libc: newlibc: Implement dummy _gettimeofday to link

With the change in SDK 0.11.1 to newlib to remove
-DMISSING_SYSCALL_NAMES we now need to implement a version of
_gettimeofday.  Previously with pre SDK 0.11.1 we had a recursive mess
of _gettimeofday_r -> gettimeofday -> _gettimeofday_r.  (which are all
implemented in newlib and thus we didn't get a link error).

With SDK 0.11.1 we have: _gettimeofday_r -> _gettimeofday.  And we
should provide a version of _gettimeofday.

Fixes #22484

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-02-05 10:51:10 -06:00 committed by Carles Cufí
commit 4fb265657d

View file

@ -358,3 +358,13 @@ void *_sbrk_r(struct _reent *r, int count)
return _sbrk(count);
}
#endif /* CONFIG_XTENSA */
struct timeval;
int _gettimeofday(struct timeval *__tp, void *__tzp)
{
ARG_UNUSED(__tp);
ARG_UNUSED(__tzp);
return -1;
}