Commit e6c6d82a authored by Christopher Friedt's avatar Christopher Friedt Committed by Carles Cufi
Browse files

shell: date_service: conditionally include posix/time.h

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

Signed-off-by: default avatarChristopher Friedt <cfriedt@meta.com>
parent 64e6c90f
Loading
Loading
Loading
Loading
+7 −1
Changes for subsys/shell/modules/date_service.c: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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>"