This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit baa21f197dfe7f11142735469ca41a11137a4b95
Author: Marco Casaroli <[email protected]>
AuthorDate: Thu Oct 8 20:29:13 2026 +0200

    drivers/timers/pl031: Build without CONFIG_RTC_ALARM.
    
    struct pl031_lowerhalf_s always had a struct lower_setalarm_s field,
    but rtc.h defines that type only with CONFIG_RTC_ALARM, so the driver
    did not compile without alarms.  No configuration enabled RTC_PL031, so
    nothing caught it.  The field is used only by the alarm code; give it
    the same condition.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 drivers/timers/pl031.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/timers/pl031.c b/drivers/timers/pl031.c
index 29133cbfce9..0ff350d5339 100644
--- a/drivers/timers/pl031.c
+++ b/drivers/timers/pl031.c
@@ -108,7 +108,9 @@ struct pl031_lowerhalf_s
 {
   FAR const struct rtc_ops_s *ops;
   uintptr_t base;
+#ifdef CONFIG_RTC_ALARM
   struct lower_setalarm_s alarm;
+#endif
 };
 
 /****************************************************************************

Reply via email to