From afaaa7b8cb645c98274dd7631f7ca13ec0ad96ce Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Mon, 4 Aug 2025 20:15:46 +0800 Subject: [PATCH] include/notifier: fix undefined reference to spin_lock_irqsave_nopreempt Fix linker error caused by including spinlock_type.h instead of spinlock.h in notifier.h header file. Error message: undefined reference to 'spin_lock_irqsave_nopreempt' in .text.clock_changed_notifier_call_chain Root cause: The notifier.h header was including which only provides type definitions, but the inline functions in notifier.h use spinlock functions like spin_lock_irqsave_nopreempt(). These functions are defined in , not in spinlock_type.h. Solution: Change the include from to to get both the type definitions and the function implementations. This fixes the undefined reference error when using notifier chains with spinlock protection. Signed-off-by: dongjiuzhu1 --- include/nuttx/notifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nuttx/notifier.h b/include/nuttx/notifier.h index cc847121bef..b3fd188dcb8 100644 --- a/include/nuttx/notifier.h +++ b/include/nuttx/notifier.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include