diff options
| author | Hauke Mehrtens | 2025-10-26 23:16:01 +0100 |
|---|---|---|
| committer | jvoisin | 2025-10-28 20:09:50 +0100 |
| commit | 4b6225cf322adf3e47425156e00a844b2f08e221 (patch) | |
| tree | 82b4cf708aec0ca165bccac0c7dec528fd7e571d /tests/test_wmemset_dynamic.c | |
| parent | 7027b39b4de8ba361efce499472008e21ee29f86 (diff) | |
fortify-headers: Remove __fh_has_builtin()
GCC complains about the `defined` usage here. Just call `__has_builtin` directly.
This fixes the following compile error when compiling strace:
```
In file included from /home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/stdlib.h:27,
from number_set.c:14:
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
| ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:28:7: note: in expansion of macro '__fh_has_builtin'
28 | #if ! __fh_has_builtin(__builtin_trap)
| ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
| ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:73:29: note: in expansion of macro '__fh_has_builtin'
73 | #if _FORTIFY_SOURCE > 2 && __fh_has_builtin (__builtin_dynamic_object_size)
| ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
| ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:158:5: note: in expansion of macro '__fh_has_builtin'
158 | #if __fh_has_builtin (__builtin_mul_overflow_p)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'tests/test_wmemset_dynamic.c')
0 files changed, 0 insertions, 0 deletions
