From 134961a8e9b11c4d026e908b81b1c794211e5d2c Mon Sep 17 00:00:00 2001 From: tarun Date: Thu, 19 Mar 2026 22:46:28 +0530 Subject: [PATCH] Fix build with GCC 15+ and DPDK 25.11+ GCC 15 introduces __STDC_EMBED_EMPTY__, __STDC_EMBED_FOUND__, and __STDC_EMBED_NOT_FOUND__ as built-in macros (C23 #embed). These are dumped into filtered_predefined_macros.h by kern.pre.mk but not filtered, causing -Werror redefinition errors. Add them to IMACROS_FILTER. DPDK 25.11 marks rte_eth_link_get_nowait() with warn_unused_result. Check the return value in check_all_ports_link_status() to fix the -Werror build failure. --- lib/ff_dpdk_if.c | 3 ++- mk/kern.pre.mk | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ff_dpdk_if.c b/lib/ff_dpdk_if.c index 5b53c54a6..a00fcb938 100644 --- a/lib/ff_dpdk_if.c +++ b/lib/ff_dpdk_if.c @@ -217,7 +217,8 @@ check_all_ports_link_status(void) for (i = 0; i < nb_ports; i++) { uint16_t portid = ff_global_cfg.dpdk.portid_list[i]; memset(&link, 0, sizeof(link)); - rte_eth_link_get_nowait(portid, &link); + if (rte_eth_link_get_nowait(portid, &link) < 0) + link.link_status = 0; /* print link status if flag set */ if (print_flag == 1) { diff --git a/mk/kern.pre.mk b/mk/kern.pre.mk index cda9fe774..eedcb88c4 100644 --- a/mk/kern.pre.mk +++ b/mk/kern.pre.mk @@ -109,6 +109,7 @@ IMACROS_FILTER+= __CYGWIN__ __CYGWIN32__ IMACROS_FILTER+= __FreeBSD__ IMACROS_FILTER+= __linux __linux__ __gnu__linux__ linux IMACROS_FILTER+= _WIN32 _WIN64 +IMACROS_FILTER+= __STDC_EMBED_EMPTY__ __STDC_EMBED_FOUND__ __STDC_EMBED_NOT_FOUND__ SPACE= $(eval) $(eval) IMACROS_FILTER_EXPR:= $(subst ${SPACE},|,$(strip ${IMACROS_FILTER}))