This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 5db3aa9e9324301a58bdc270fce8cb068b57ae28 Author: yushuailong <[email protected]> AuthorDate: Fri Sep 11 20:15:14 2026 +0800 sched/clock: Avoid duplicate adjtime implementation. CLOCK_TIMEKEEPING already provides a software-based adjtime implementation. Exclude the generic adjtime state and entry point when timekeeping is enabled, while retaining clock_adjtime support for PTP clocks. Assisted-by: OpenAI Codex Signed-off-by: yushuailong <[email protected]> --- sched/clock/clock_adjtime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sched/clock/clock_adjtime.c b/sched/clock/clock_adjtime.c index 76771d44a50..5b970474fd0 100644 --- a/sched/clock/clock_adjtime.c +++ b/sched/clock/clock_adjtime.c @@ -50,6 +50,9 @@ * Private Data ****************************************************************************/ +/* CLOCK_TIMEKEEPING provides its own software-based adjtime(). */ + +#ifndef CONFIG_CLOCK_TIMEKEEPING static struct wdog_s g_adjtime_wdog; static long g_adjtime_ppb; static spinlock_t g_adjtime_lock = SP_UNLOCKED; @@ -216,6 +219,7 @@ int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta) return OK; } } +#endif /* !CONFIG_CLOCK_TIMEKEEPING */ /**************************************************************************** * Name: nxclock_adjtime
