summaryrefslogtreecommitdiff
path: root/include/fortify-headers.h
diff options
context:
space:
mode:
authorjvoisin2023-07-18 23:07:05 +0200
committerjvoisin2023-07-18 23:07:05 +0200
commit9aa4490263ead62dc545cf0e8b83e0ef77eb7a6e (patch)
treedde291ce98e99e76bc9e085c35311f2942cac0c8 /include/fortify-headers.h
parent8b6129312db7b2405f883c4080b835c69a855627 (diff)
Make use of the alloc_size attribute
Diffstat (limited to 'include/fortify-headers.h')
-rw-r--r--include/fortify-headers.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h
index 2f81fc0..dde19a2 100644
--- a/include/fortify-headers.h
+++ b/include/fortify-headers.h
@@ -78,6 +78,13 @@
78#define __malloc(...) 78#define __malloc(...)
79#endif 79#endif
80 80
81#if __has_attribute (alloc_size)
82#define __alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__)))
83#else
84#define __alloc_size(...)
85#endif
86
87
81#endif /* __has_attribute */ 88#endif /* __has_attribute */
82 89
83 90