![]() |
|
Message-Id: <20250930024538.3663245-2-Qi.Chen@windriver.com> Date: Tue, 30 Sep 2025 10:45:38 +0800 From: Qi.Chen@...driver.com To: musl@...ts.openwall.com Cc: qi.chen@...driver.com Subject: [PATCH 2/2] include/netinet/if_ether.h: guard ethhdr definition to better work with other header files From: Chen Qi <Qi.Chen@...driver.com> The unconditional definition of 'struct ethhdr' has the implicit requirement on this header file, that is, it needs to be included before other header files defining ethhdr. Signed-off-by: Chen Qi <Qi.Chen@...driver.com> --- include/netinet/if_ether.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h index b1646f6f..e5a1ebd0 100644 --- a/include/netinet/if_ether.h +++ b/include/netinet/if_ether.h @@ -112,12 +112,14 @@ #define ETH_P_XDSA 0x00F8 #define ETH_P_MAP 0x00F9 +#ifndef __UAPI_DEF_ETHHDR struct ethhdr { uint8_t h_dest[ETH_ALEN]; uint8_t h_source[ETH_ALEN]; uint16_t h_proto; }; #define __UAPI_DEF_ETHHDR 0 +#endif #include <net/ethernet.h> #include <net/if_arp.h> -- 2.34.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.