diff options
| author | jvoisin | 2023-08-22 19:36:46 +0200 |
|---|---|---|
| committer | jvoisin | 2023-08-22 19:36:46 +0200 |
| commit | e93e9325285eafba1afd60e56a6afb400cf9c8f3 (patch) | |
| tree | 0279afbc80f4620d085ebd957dafec28c71668ac /include | |
| parent | acfa9f6ce8295b2493b4e21b73463b93ef3c4333 (diff) | |
Increase portability
If the compiler doesn't know about `__builtin_trap`,
use `abort` instead.
Diffstat (limited to 'include')
| -rw-r--r-- | include/fortify-headers.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 @@ | |||
| 21 | #error a compiler with __has_builtin support is required | 21 | #error a compiler with __has_builtin support is required |
| 22 | #endif | 22 | #endif |
| 23 | 23 | ||
| 24 | #if ! __has_builtin(__builtin_trap) | ||
| 25 | #define __builtin_trap abort | ||
| 26 | #endif | ||
| 24 | 27 | ||
| 25 | #ifdef __clang__ | 28 | #ifdef __clang__ |
| 26 | 29 | ||
