diff options
author | Jo-Philipp Wich <jo@mein.io> | 2024-10-17 16:44:46 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2024-10-17 16:44:46 +0200 |
commit | 79ccd9cf73504ce541217d823071c386170ebd5f (patch) | |
tree | 08191ad100e07ede35c51ddb2f9a2a06d4b2a0c6 | |
parent | 402280dca0fe43c14b4cedbdf5263eeb2f33d745 (diff) |
socket: provide local definition of `struct fanout_args`
The `fanout_args` structure is a relatively recent addition to the kernel
so provide a local definition for it, like we already do it for other like
`timeval_old`.
Fixes: #217
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | lib/socket.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/socket.c b/lib/socket.c index 63ca24f..db77188 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -1396,12 +1396,23 @@ static struct_t st_tpacket_auxdata = { } }; +struct fanout_args_local { +#if __BYTE_ORDER == __LITTLE_ENDIAN + uint16_t id; + uint16_t type_flags; +#else + uint16_t type_flags; + uint16_t id; +#endif + uint32_t max_num_members; +}; + static struct_t st_fanout_args = { - .size = sizeof(struct fanout_args), + .size = sizeof(struct fanout_args_local), .members = (member_t []){ - STRUCT_MEMBER_NP(fanout_args, id, DT_UNSIGNED), - STRUCT_MEMBER_NP(fanout_args, type_flags, DT_UNSIGNED), - STRUCT_MEMBER_NP(fanout_args, max_num_members, DT_UNSIGNED), + STRUCT_MEMBER_NP(fanout_args_local, id, DT_UNSIGNED), + STRUCT_MEMBER_NP(fanout_args_local, type_flags, DT_UNSIGNED), + STRUCT_MEMBER_NP(fanout_args_local, max_num_members, DT_UNSIGNED), { 0 } } }; |