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-apps.git
commit 35e580440fe2301dad5415149941c2331291688b Author: guoshichao <[email protected]> AuthorDate: Sat Oct 4 17:33:42 2025 +0800 netutils/ptpd: build without full signal support. ptp_signal_handler() and ptp_setup_sighandlers() use sigaction() and siginfo_t, which are only available with CONFIG_ENABLE_ALL_SIGNALS. Compile them only in that case, as netutils/dhcpc does; status and stop requests still work through the in-memory IPC. Signed-off-by: guoshichao <[email protected]> Assisted-by: Kiro:claude-opus-4 --- netutils/ptpd/ptpd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netutils/ptpd/ptpd.c b/netutils/ptpd/ptpd.c index 559ce3951..44ab05f99 100644 --- a/netutils/ptpd/ptpd.c +++ b/netutils/ptpd/ptpd.c @@ -2334,6 +2334,7 @@ static int ptp_process_rx_packet(FAR struct ptp_state_s *state, /* Signal handler for status / stop requests */ +#ifdef CONFIG_ENABLE_ALL_SIGNALS static void ptp_signal_handler(int signo, FAR siginfo_t *siginfo, FAR void *context) { @@ -2365,6 +2366,7 @@ static void ptp_setup_sighandlers(FAR struct ptp_state_s *state) sigaction(SIGHUP, &act, NULL); sigaction(SIGUSR1, &act, NULL); } +#endif /* Populate status information structure from current state */ @@ -2539,7 +2541,9 @@ int ptpd_start(FAR const struct ptpd_config_s *config) timeout = CONFIG_NETUTILS_PTPD_SYNC_INTERVAL_MSEC; } +#ifdef CONFIG_ENABLE_ALL_SIGNALS ptp_setup_sighandlers(state); +#endif pollfds[0].events = POLLIN; pollfds[0].fd = state->event_socket;
