mem: fix build
PATCH 1/1 mem: fix build
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".
--- lib/librte_eal/common/eal_common_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eal/common/eal_common_memory.c +1 -1
@@ -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 definedRTE_EXEC_ENV_FREEBSD #define RTE_DONTDUMP MADV_NOCORE#else #error "madvise doesn't support this OS"
Signature · 1 line
2.26.0
Quoted 8 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Thomas Monjalon
Sent: Sunday, April 26, 2020 1:47 PM
To: [email protected]
Cc: [email protected]; Anatoly Burakov <[email protected]>; Li Feng <[email protected]>
Subject: [dpdk-dev] [PATCH] mem: fix build
Quoted 8 lines
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 <[email protected]>
Quoted 19 lines
--- lib/librte_eal/common/eal_common_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_eal/common/eal_common_memory.c +1
-2@@ -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 definedRTE_EXEC_ENV_FREEBSD #define RTE_DONTDUMP MADV_NOCORE#else #error "madvise doesn't support this OS" --
Quoted 1 line
2.26.0
Kindest regards
Raslan Darawsheh
Thomas Monjalon
AppliedQuoted 9 lines
Quoted 8 lines
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 <[email protected]>Tested-by Raslan Darawsheh <[email protected]>
Applied