diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-02-14 15:31:56 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-02-23 23:15:12 +0000 |
commit | eed0697ec9cf39da42c22dbd94d9addadd841fb0 (patch) | |
tree | 196de02b434c7ea7a4be8f936594868ecb7fb129 /include | |
parent | eaa92ea4224e161075db3fef3fc12a5d3c72d020 (diff) |
os: consolidate busfault handling
The symbols HAVE_SIGACTION and BUSFAULT are set under the same conditions,
so can be consolidated into one. Also define dummies when HAVE_SIGACTION
is not set, so a few #ifdef's less clutterig the code.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1297>
Diffstat (limited to 'include')
-rw-r--r-- | include/busfault.h | 7 | ||||
-rw-r--r-- | include/meson.build | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/busfault.h b/include/busfault.h index 3b668818d..f89a5833e 100644 --- a/include/busfault.h +++ b/include/busfault.h @@ -25,7 +25,7 @@ #include <dix-config.h> -#ifdef BUSFAULT +#ifdef HAVE_SIGACTION #include <sys/types.h> @@ -43,6 +43,11 @@ busfault_check(void); Bool busfault_init(void); +#else + +static inline void busfault_check(void) {} +static inline Bool busfault_init(void) { return FALSE; } + #endif #endif /* _BUSFAULT_H_ */ diff --git a/include/meson.build b/include/meson.build index 6ec1a96f8..c109bcc40 100644 --- a/include/meson.build +++ b/include/meson.build @@ -179,8 +179,6 @@ conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf') ? '1' : false) conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext') ? '1' : false) conf_data.set('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>') ? '1' : false) -conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION')) - # Don't let X dependencies typedef 'pointer' conf_data.set('_XTYPEDEF_POINTER', '1') conf_data.set('_XITYPEDEF_POINTER', '1') |