From e93e9325285eafba1afd60e56a6afb400cf9c8f3 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 22 Aug 2023 19:36:46 +0200 Subject: Increase portability If the compiler doesn't know about `__builtin_trap`, use `abort` instead. --- include/fortify-headers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/fortify-headers.h b/include/fortify-headers.h index 3e2140f..dbace47 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h @@ -21,6 +21,9 @@ #error a compiler with __has_builtin support is required #endif +#if ! __has_builtin(__builtin_trap) +#define __builtin_trap abort +#endif #ifdef __clang__ -- cgit v1.3