bus/dpaa: fix build
PATCH 1/1 bus/dpaa: fix build
The DPAA bus driver is defining some macros without prefix. So it can conflict with other libraries like libbsd:
drivers/bus/dpaa/include/compat.h:53:
error: "__packed" redefined
/usr/include/bsd/sys/cdefs.h:120:
note: this is the location of the previous definition
--- drivers/bus/dpaa/include/compat.h | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/bus/dpaa/include/compat.h +6 -0
@@ -48,9 +48,15 @@*/ /* Required compiler attributes */ +#ifndef __maybe_unused#define __maybe_unused __rte_unused +#endif +#ifndef __always_unused#define __always_unused __rte_unused +#endif +#ifndef __packed#define __packed __rte_packed +#endif #define noinline __attribute__((noinline))#define L1_CACHE_BYTES 64
Signature · 1 line
2.17.1
Quoted 30 lines · Thomas Monjalon
The DPAA bus driver is defining some macros without prefix. So it can conflict with other libraries like libbsd:
drivers/bus/dpaa/include/compat.h:53:
error: "__packed" redefined
/usr/include/bsd/sys/cdefs.h:120:
note: this is the location of the previous definitionFixes 39f373cf015a ("bus/dpaa: add compatibility and helper macros")Signed-off-by Thomas Monjalon <[email protected]>--- drivers/bus/dpaa/include/compat.h | 6 ++++++ 1 file changed, 6 insertions(+)drivers/bus/dpaa/include/compat.h +1
-0@@ -48,9 +48,15 @@*/ /* Required compiler attributes */ +#ifndef __maybe_unused#define __maybe_unused __rte_unused
drivers/bus/dpaa/include/compat.h line 62
Quoted 10 lines
drivers/bus/dpaa/include/compat.h +5
-0+#endif +#ifndef __always_unused#define __always_unused __rte_unused +#endif +#ifndef __packed#define __packed __rte_packed +#endif #define noinline __attribute__((noinline))#define L1_CACHE_BYTES 64
A similar patch was also issued by Jerin a few weeks back:
http://patches.dpdk.org/patch/40597/
There may be conflict while merging.
Whether you take that, or this (preferred):
21/06/2018 09:58, Shreyansh Jain:
Quoted 39 lines · Thomas Monjalon
Quoted 38 lines
The DPAA bus driver is defining some macros without prefix. So it can conflict with other libraries like libbsd:
drivers/bus/dpaa/include/compat.h:53:
error: "__packed" redefined
/usr/include/bsd/sys/cdefs.h:120:
note: this is the location of the previous definitionFixes 39f373cf015a ("bus/dpaa: add compatibility and helper macros")Signed-off-by Thomas Monjalon <[email protected]>--- drivers/bus/dpaa/include/compat.h | 6 ++++++ 1 file changed, 6 insertions(+)drivers/bus/dpaa/include/compat.h +6
-0@@ -48,9 +48,15 @@*/ /* Required compiler attributes */ +#ifndef __maybe_unused#define __maybe_unused __rte_unused +#endif +#ifndef __always_unused#define __always_unused __rte_unused +#endif +#ifndef __packed#define __packed __rte_packed +#endif #define noinline __attribute__((noinline))
Quoted 5 lines
drivers/bus/dpaa/include/compat.h line 62
Quoted 2 lines
drivers/bus/dpaa/include/compat.h +0
-0#define L1_CACHE_BYTES 64A similar patch was also issued by Jerin a few weeks back:
http://patches.dpdk.org/patch/40597/
I missed it.
Quoted 5 lines
There may be conflict while merging.
Whether you take that, or this (preferred):
Acked-by Shreyansh Jain <[email protected]>
This one is more complete.
Applied