diff options
| author | jvoisin | 2025-11-12 22:28:13 +0100 |
|---|---|---|
| committer | jvoisin | 2025-11-14 13:55:31 +0100 |
| commit | bf242b15e1f7873bdb940c2441b5e57747bc2f81 (patch) | |
| tree | dd80ee51edf4542b65a9e49db369dc44d089c359 /include/fortify-headers.h | |
| parent | c93890993aded39be2f8f820fb19d8efe2cd9184 (diff) | |
Add `access` annotations
Diffstat (limited to 'include/fortify-headers.h')
| -rw-r--r-- | include/fortify-headers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h index e406dce..a9b7498 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h | |||
| @@ -59,4 +59,15 @@ | |||
| 59 | #define __bos(ptr, type) __builtin_object_size (ptr, type) | 59 | #define __bos(ptr, type) __builtin_object_size (ptr, type) |
| 60 | #endif | 60 | #endif |
| 61 | 61 | ||
| 62 | /* This needs to be two different conditions: https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html */ | ||
| 63 | #if defined __has_attribute | ||
| 64 | #if __has_attribute (access) | ||
| 65 | #define __access(...) __attribute__ ((access (__VA_ARGS__))) | ||
| 66 | #else | ||
| 67 | #define __access(...) | ||
| 68 | #endif | ||
| 69 | #else | ||
| 70 | #define __access(...) | ||
| 71 | #endif | ||
| 72 | |||
| 62 | #endif | 73 | #endif |
