aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/signal-common.h
diff options
context:
space:
mode:
authorWarner Losh <imp@bsdimp.com>2022-02-01 13:30:30 -0700
committerWarner Losh <imp@bsdimp.com>2022-02-01 14:43:20 -0700
commiteb9d35f686ed1279d57463d9e6f289988f594c19 (patch)
tree737a326c29f18b1445bf273eb4d857a3d2f96d8e /bsd-user/signal-common.h
parent3bbe296c1c7a6ddce7a294e006b8c4a53b385292 (diff)
downloadqemu-eb9d35f686ed1279d57463d9e6f289988f594c19.zip
qemu-eb9d35f686ed1279d57463d9e6f289988f594c19.tar.gz
qemu-eb9d35f686ed1279d57463d9e6f289988f594c19.tar.bz2
bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026
The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only define QEMU_SI_CAPSICUM there. Only copy _capsicum when QEMU_SI_CAPSICUM is defined. Default to no info being passed for signals we make no guess about. Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'bsd-user/signal-common.h')
-rw-r--r--bsd-user/signal-common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/bsd-user/signal-common.h b/bsd-user/signal-common.h
index 7ff8e8f..6f90345 100644
--- a/bsd-user/signal-common.h
+++ b/bsd-user/signal-common.h
@@ -59,12 +59,17 @@ void target_to_host_sigset(sigset_t *d, const target_sigset_t *s);
* For FreeBSD, we have si_pid, si_uid, si_status, and si_addr always. Linux and
* {Open,Net}BSD have a different approach (where their reason field is larger,
* but whose siginfo has fewer fields always).
+ *
+ * QEMU_SI_CAPSICUM is currently only FreeBSD 14 current only, so only define
+ * it where _capsicum is available.
*/
#define QEMU_SI_NOINFO 0 /* nothing other than si_signo valid */
#define QEMU_SI_FAULT 1 /* _fault is valid in _reason */
#define QEMU_SI_TIMER 2 /* _timer is valid in _reason */
#define QEMU_SI_MESGQ 3 /* _mesgq is valid in _reason */
#define QEMU_SI_POLL 4 /* _poll is valid in _reason */
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 1400026
#define QEMU_SI_CAPSICUM 5 /* _capsicum is valid in _reason */
+#endif
#endif