Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250930024538.3663245-1-Qi.Chen@windriver.com>
Date: Tue, 30 Sep 2025 10:45:37 +0800
From: Qi.Chen@...driver.com
To: musl@...ts.openwall.com
Cc: qi.chen@...driver.com
Subject: [PATCH 1/2] include/netinet/if_ether.h: define __UAPI_DEF_ETHHDR early

From: Chen Qi <Qi.Chen@...driver.com>

After 'struct ethhdr' is defined, we should immediately define
__UAPI_DEF_ETHHDR. Because the following lines are header inclusion
lines which might introduce header files checking __UAPI_DEF_ETHHDR.
If we don't define this macro early, we will get redefinition error.

Signed-off-by: Chen Qi <Qi.Chen@...driver.com>
---
 include/netinet/if_ether.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h
index 3479f511..b1646f6f 100644
--- a/include/netinet/if_ether.h
+++ b/include/netinet/if_ether.h
@@ -117,6 +117,7 @@ struct ethhdr {
 	uint8_t h_source[ETH_ALEN];
 	uint16_t h_proto;
 };
+#define __UAPI_DEF_ETHHDR       0
 
 #include <net/ethernet.h>
 #include <net/if_arp.h>
@@ -144,6 +145,4 @@ do { \
 	(enaddr)[5] = ((uint8_t *)ipaddr)[3]; \
 } while(0)
 
-#define __UAPI_DEF_ETHHDR       0
-
 #endif
-- 
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.