shell: date_service: conditionally include posix/time.h

When compiling for ARCH_POSIX, include `time.h` rather than
`posix/time.h`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2023-08-20 15:07:29 -04:00 committed by Carles Cufí
commit e6c6d82a00

View file

@ -8,9 +8,15 @@
#include <zephyr/shell/shell.h>
#include <zephyr/init.h>
#include <string.h>
#include <zephyr/posix/time.h>
#include <zephyr/sys/timeutil.h>
#if defined(CONFIG_ARCH_POSIX) && defined(CONFIG_EXTERNAL_LIBC)
#include <time.h>
#else
#include <zephyr/posix/time.h>
#endif
#define HELP_NONE "[none]"
#define HELP_DATE_SET "[Y-m-d] <H:M:S>"