Patchwork [dpdk-dev,v3,11/15] bus/dpaa: fix warning: "__WORDSIZE" is not defined, evaluates to 0

mail settings
Submitter Natanael Copa
Date March 13, 2019, 5:06 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/748345/
State New
Headers show


Natanael Copa - March 13, 2019, 5:06 p.m.
There is no standard saying that __WORDSIZE should be be defined or in
what include it should be defined. Use a portable way to detect 64 bit

This fixes a warning when building with musl libc:

 warning: "__WORDSIZE" is not defined, evaluates to 0 [-Wundef]

Signed-off-by: Natanael Copa <>
 drivers/bus/dpaa/include/fsl_qman.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index e43841499..7f3f40d49 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -11,11 +11,12 @@ 
 extern "C" {
+#include <limits.h>
 #include <dpaa_rbtree.h>
 #include <rte_eventdev.h>
 /* FQ lookups (turn this on for 64bit user-space) */
-#if (__WORDSIZE == 64)
+#if (ULONG_MAX == 0xffffffffffffffff)
 /* if FQ lookups are supported, this controls the number of initialised,
  * s/w-consumed FQs that can be supported at any one time.