diff options
| author | Wake Liu <wakel@google.com> | 2025-08-07 16:09:32 +0800 | 
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-11 20:08:32 -0700 | 
| commit | c36748e8733ef9c5f4cd1d7c4327994e5b88b8df (patch) | |
| tree | 174496997fc917af398aa436ac7b02b2161a7015 /rust/helpers/platform.c | |
| parent | 37816488247ddddbc3de113c78c83572274b1e2e (diff) | |
selftests/net: Replace non-standard __WORDSIZE with sizeof(long) * 8
The `__WORDSIZE` macro, defined in the non-standard `<bits/wordsize.h>`
header, is a GNU extension and not universally available with all
toolchains, such as Clang when used with musl libc.
This can lead to build failures in environments where this header is
missing.
The intention of the code is to determine the bit width of a C `long`.
Replace the non-portable `__WORDSIZE` with the standard and portable
`sizeof(long) * 8` expression to achieve the same result.
This change also removes the inclusion of the now-unused
`<bits/wordsize.h>` header.
Signed-off-by: Wake Liu <wakel@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions
