summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjvoisin2023-08-20 20:28:13 +0200
committerjvoisin2023-08-20 20:51:19 +0200
commitc29287d01bceb0a54996be1e138f2e7f62917907 (patch)
treea902e3c288f31b39a2adb249328f050216c2fd48 /include
parentbc50ed6c3de76c11b2dde92d0f28dd45941fc327 (diff)
Make use of pass_dynamic_object_size when available
Diffstat (limited to 'include')
-rw-r--r--include/fortify-headers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h
index 18d302b..a918b10 100644
--- a/include/fortify-headers.h
+++ b/include/fortify-headers.h
@@ -25,7 +25,11 @@
25#ifdef __clang__ 25#ifdef __clang__
26 26
27/* clang uses overloads; see https://github.com/llvm/llvm-project/issues/53516 */ 27/* clang uses overloads; see https://github.com/llvm/llvm-project/issues/53516 */
28#if __has_attribute(pass_dynamic_object_size)
29#define _FORTIFY_POSN(n) const __attribute__((pass_dynamic_object_size(n)))
30#else
28#define _FORTIFY_POSN(n) const __attribute__((pass_object_size(n))) 31#define _FORTIFY_POSN(n) const __attribute__((pass_object_size(n)))
32#endif /* pass_dynamic_object_size) */
29/* we can't use extern inline with overloads without making them external */ 33/* we can't use extern inline with overloads without making them external */
30#define _FORTIFY_INLINE static __inline__ \ 34#define _FORTIFY_INLINE static __inline__ \
31 __attribute__((__always_inline__,__artificial__,__overloadable__)) 35 __attribute__((__always_inline__,__artificial__,__overloadable__))