lwip/0175-fix-IFNAMSIZ-definition-conflict-between-lwip-and-ke.patch
yangchen 567dc04c84 fix IFNAMSIZ definition conflict between lwip and kernel
(cherry picked from commit 8ec18511ecfd6990b17210b27ffb17c3a7bf4c2b)
2024-11-15 19:43:38 +08:00

33 lines
857 B
Diff

From 6a32cc176ccec6a0afa8a6f954a02fa851c99274 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Mon, 11 Nov 2024 15:49:13 +0800
Subject: [PATCH] fix IFNAMSIZ definition conflict between lwip and kernel
---
src/include/lwip/netif.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h
index 02c0822..3deefb0 100644
--- a/src/include/lwip/netif.h
+++ b/src/include/lwip/netif.h
@@ -67,11 +67,15 @@ extern "C" {
#define NETIF_MAX_HWADDR_LEN 6U
#endif
+#if GAZELLE_ENABLE
+#define NETIF_NAMESIZE 16 /* same as IFNAMSIZ in net/if.h */
+#else
/** The size of a fully constructed netif name which the
* netif can be identified by in APIs. Composed of
* 2 chars, 3 (max) digits, and 1 \0
*/
#define NETIF_NAMESIZE 6
+#endif
/**
* @defgroup netif_flags Flags
--
2.33.0