diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2021-05-20 02:39:19 +0100 |
---|---|---|
committer | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2021-05-20 03:01:05 +0100 |
commit | adfb0b99c220a188ad510cc9a81e486f51a667c5 (patch) | |
tree | 71cb9720f54fbcf27b37132ecc53c8ca01d0860a | |
parent | cf0cb5819fa0b582110cde1780ce7ce9058cb516 (diff) |
wsutil: Avoid using g_abort()
g_abort() requires GLib 2.50, our minimum required version
is 2.38.
-rw-r--r-- | wsutil/ws_assert.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wsutil/ws_assert.h b/wsutil/ws_assert.h index 2f0686d6dc..6c2373bf95 100644 --- a/wsutil/ws_assert.h +++ b/wsutil/ws_assert.h @@ -11,6 +11,7 @@ #define __WS_ASSERT_H__ #include <ws_attributes.h> +#include <stdlib.h> /* * ws_assert() cannot produce side effects, otherwise code will @@ -33,13 +34,13 @@ * g_assert_not_reached() and G_DISABLE_ASSERT. However if that is not * the case then g_assert_not_reached() is simply (void)0 and that * causes the spurious warnings, because the compiler can't tell anymore - * that a certain code path is not used. We add the call to g_abort() so + * that a certain code path is not used. We add the call to abort() so * that the function never returns, even with G_DISABLE_ASSERT. */ static inline WS_NORETURN void ws_assert_not_reached(void) { g_assert_not_reached(); - g_abort(); + abort(); }; #endif /* __WS_ASSERT_H__ */ |