DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mem: fix build
@ 2020-04-26 10:47 Thomas Monjalon
  2020-04-26 11:00 ` Raslan Darawsheh
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2020-04-26 10:47 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Anatoly Burakov, Li Feng

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@monjalon.net>
---
 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.26.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] mem: fix build
  2020-04-26 10:47 [dpdk-dev] [PATCH] mem: fix build Thomas Monjalon
@ 2020-04-26 11:00 ` Raslan Darawsheh
  2020-04-26 11:27   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Raslan Darawsheh @ 2020-04-26 11:00 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: david.marchand, Anatoly Burakov, Li Feng

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Thomas Monjalon
> Sent: Sunday, April 26, 2020 1:47 PM
> To: dev@dpdk.org
> Cc: david.marchand@redhat.com; Anatoly Burakov
> <anatoly.burakov@intel.com>; Li Feng <fengli@smartx.com>
> Subject: [dpdk-dev] [PATCH] 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".
> 
> Fixes: d72e4042c5eb ("mem: exclude unused memory from core dump")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Raslan Darawsheh <rasland@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.26.0

Kindest regards
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] mem: fix build
  2020-04-26 11:00 ` Raslan Darawsheh
@ 2020-04-26 11:27   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-04-26 11:27 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: dev, david.marchand, Anatoly Burakov, Li Feng

> > 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@monjalon.net>
> Tested-by: Raslan Darawsheh <rasland@mellanox.com>

Applied




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-26 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-26 10:47 [dpdk-dev] [PATCH] mem: fix build Thomas Monjalon
2020-04-26 11:00 ` Raslan Darawsheh
2020-04-26 11:27   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).