From: Thomas Monjalon Date: Tue, 1 Feb 2022 09:46:37 +0000 (+0100) Subject: net/dpaa2: fix build with musl X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dad044030e750af38b8bc92fa7e4c3db1ad69b6e;p=dpdk.git net/dpaa2: fix build with musl PAGE_SIZE is already defined in musl libc: drivers/net/dpaa2/dpaa2_recycle.c:35: error: "PAGE_SIZE" redefined /usr/include/limits.h:97: note: this is the location of the previous definition 97 | #define PAGE_SIZE PAGESIZE Fixes: f023d059769f ("net/dpaa2: support recycle loopback port") Reported-by: David Marchand Signed-off-by: Thomas Monjalon Acked-by: Nipun Gupta --- diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c index c5e9e9721d..336506dc0d 100644 --- a/drivers/net/dpaa2/dpaa2_recycle.c +++ b/drivers/net/dpaa2/dpaa2_recycle.c @@ -32,7 +32,9 @@ #include #include +#ifndef PAGE_SIZE #define PAGE_SIZE (sysconf(_SC_PAGESIZE)) +#endif #define PAGE_MASK (~(PAGE_SIZE - 1)) #define LSX_SERDES_LAN_NB 8