diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-03-17 04:01:30 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-03-17 04:01:30 -0700 |
| commit | d26a3a6ce7e02f9c056ad992bcd9624735022337 (patch) | |
| tree | 9df8aeaceed50bf65d01172c67f67035c9fa59ef /include/linux/fortify-string.h | |
| parent | 007e50eb5dbe7b33a43a1449a0d9c29e8dcf1c67 (diff) | |
| parent | eeac8ede17557680855031c6f305ece2378af326 (diff) | |
Merge tag 'v6.3-rc2' into next
Merge with mainline to get of_property_present() and other newer APIs.
Diffstat (limited to 'include/linux/fortify-string.h')
| -rw-r--r-- | include/linux/fortify-string.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fortify-string.h b/include/linux/fortify-string.h index 7cad8bb031e9..c9de1f59ee80 100644 --- a/include/linux/fortify-string.h +++ b/include/linux/fortify-string.h @@ -90,10 +90,17 @@ extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) * size, rather than struct size), but there remain some stragglers using * type 0 that will be converted in the future. */ +#if __has_builtin(__builtin_dynamic_object_size) +#define POS __pass_dynamic_object_size(1) +#define POS0 __pass_dynamic_object_size(0) +#define __struct_size(p) __builtin_dynamic_object_size(p, 0) +#define __member_size(p) __builtin_dynamic_object_size(p, 1) +#else #define POS __pass_object_size(1) #define POS0 __pass_object_size(0) #define __struct_size(p) __builtin_object_size(p, 0) #define __member_size(p) __builtin_object_size(p, 1) +#endif #define __compiletime_lessthan(bounds, length) ( \ __builtin_constant_p((bounds) < (length)) && \ |
