]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Fix unknown sig_atomic_t compile error
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 29 Feb 2024 12:17:20 +0000 (14:17 +0200)
committerton31337 <3352707+ton31337@users.noreply.github.com>
Tue, 12 Mar 2024 20:34:30 +0000 (20:34 +0000)
This is happening for Alpine Linux.

```
26 64.59 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t'
26 64.59    23 |         volatile sig_atomic_t caught; /* private member   */
26 64.59       |                  ^~~~~~~~~~~~
26 64.60 In file included from ./lib/libfrr.h:12,
26 64.60                  from ./lib/vty.h:28,
26 64.60                  from ./lib/command.h:11,
26 64.60                  from ./lib/debug.h:11,
26 64.60                  from ./mgmtd/mgmt.h:12,
26 64.60                  from mgmtd/mgmt_history.c:14:
26 64.60 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t'
26 64.60    23 |         volatile sig_atomic_t caught; /* private member   */
26 64.60       |                  ^~~~~~~~~~~~
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit f03b0bfaa4225182064d7749808b49760a618d29)

lib/frrevent.h

index 998727f0799de059c6066973faf2030548eb1621..94640a76b70f46a233f336a034a56629ecace284 100644 (file)
@@ -6,6 +6,7 @@
 #ifndef _ZEBRA_THREAD_H
 #define _ZEBRA_THREAD_H
 
+#include <signal.h>
 #include <zebra.h>
 #include <pthread.h>
 #include <poll.h>