samples: posix: gettimeofday: include time.h

Due to some previous time-related header issues, we included
`<sys/time.h>` without including `<time.h>`. The latter is
necessary for `time()` (specified by both ISO C and POSIX).

Fixes #53673

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2023-01-10 16:35:11 -05:00 committed by Carles Cufí
commit 85b44f0ed7

View file

@ -8,6 +8,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <sys/time.h> #include <sys/time.h>
#include <time.h>
#include <unistd.h> #include <unistd.h>
int main(void) int main(void)