summaryrefslogtreecommitdiff
path: root/include/fortify-headers.h
diff options
context:
space:
mode:
authorjvoisin2023-08-22 19:36:46 +0200
committerjvoisin2023-08-22 19:36:46 +0200
commite93e9325285eafba1afd60e56a6afb400cf9c8f3 (patch)
tree0279afbc80f4620d085ebd957dafec28c71668ac /include/fortify-headers.h
parentacfa9f6ce8295b2493b4e21b73463b93ef3c4333 (diff)
Increase portability
If the compiler doesn't know about `__builtin_trap`, use `abort` instead.
Diffstat (limited to 'include/fortify-headers.h')
-rw-r--r--include/fortify-headers.h3
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