]> git.droids-corp.org - dpdk.git/commitdiff
net/dpaa2: fix build with musl
authorThomas Monjalon <thomas@monjalon.net>
Tue, 1 Feb 2022 09:46:37 +0000 (10:46 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 1 Feb 2022 10:58:58 +0000 (11:58 +0100)
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 <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
drivers/net/dpaa2/dpaa2_recycle.c

index c5e9e9721d6e060f768349b09d2c604bd2827055..336506dc0d9e8fb02901adbc9f1661286bc2fc33 100644 (file)
@@ -32,7 +32,9 @@
 #include <unistd.h>
 #include <sys/mman.h>
 
+#ifndef PAGE_SIZE
 #define PAGE_SIZE                      (sysconf(_SC_PAGESIZE))
+#endif
 #define PAGE_MASK                      (~(PAGE_SIZE - 1))
 
 #define LSX_SERDES_LAN_NB              8