summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2024-10-18 00:11:29 +0200
committerGitHub <noreply@github.com>2024-10-18 00:11:29 +0200
commitaa189522c26ba7d7bc34aca07351f7f359e89423 (patch)
tree08191ad100e07ede35c51ddb2f9a2a06d4b2a0c6
parent402280dca0fe43c14b4cedbdf5263eeb2f33d745 (diff)
parent79ccd9cf73504ce541217d823071c386170ebd5f (diff)
Merge pull request #241 from jow-/socket-local-fanout-decl
socket: provide local definition of `struct fanout_args`
-rw-r--r--lib/socket.c19
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 }
}
};