[dpdk-stable] [PATCH 19.11 2/2] mem: fix build
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Feb 22 12:58:40 CET 2021
From: Thomas Monjalon <thomas at monjalon.net>
[ backported from upstream commit 27efcf2003113fc9a236d8cf5b6c5e01b28b59ca ]
Some compilers (on RHEL7 and CentOS7) were getting this error:
error: "RTE_EXEC_ENV_FREEBSD" is not defined [-Werror=undef]
Existence of a macro must be checked with "#ifdef" or "#if defined".
Fixes: d72e4042c5eb ("mem: exclude unused memory from core dump")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Tested-by: Raslan Darawsheh <rasland at mellanox.com>
---
lib/librte_eal/common/eal_common_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 9a797a4fa3..4c897a13f1 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -42,7 +42,7 @@ static uint64_t system_page_sz;
#ifdef RTE_EXEC_ENV_LINUX
#define RTE_DONTDUMP MADV_DONTDUMP
-#elif RTE_EXEC_ENV_FREEBSD
+#elif defined RTE_EXEC_ENV_FREEBSD
#define RTE_DONTDUMP MADV_NOCORE
#else
#error "madvise doesn't support this OS"
--
2.29.2
More information about the stable
mailing list