From: Lennart Poettering Date: Sun, 16 Aug 2020 09:28:34 +0000 (+0200) Subject: in-addr-util: add byte accessor array to union in_addr_union X-Git-Tag: v247-rc1~361^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7dfa1df8b35f71615f257f177a6d07ddb674145;p=thirdparty%2Fsystemd.git in-addr-util: add byte accessor array to union in_addr_union It's pretty useful to be able to access the bytes generically, without acknowledging a specific family, hence let's a third way to access an in_addr_union. --- diff --git a/src/basic/in-addr-util.h b/src/basic/in-addr-util.h index dc3f575bc97..03583f25661 100644 --- a/src/basic/in-addr-util.h +++ b/src/basic/in-addr-util.h @@ -12,6 +12,7 @@ union in_addr_union { struct in_addr in; struct in6_addr in6; + uint8_t bytes[CONST_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))]; }; struct in_addr_data {