From: Jerin Jacob Date: Fri, 13 Oct 2017 11:31:35 +0000 (+0530) Subject: mempool/octeontx: fix build with old gcc X-Git-Tag: spdx-start~1325 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=50aa486c877a8d5482fde4b0dacd0fad40789864;p=dpdk.git mempool/octeontx: fix build with old gcc Replaced _Static_assert compiler function with RTE_BUILD_BUG_ON() to fix build issue with old gcc. Fixes: 02fd6c744350 ("mempool/octeontx: support allocation") Signed-off-by: Jerin Jacob --- diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c index eea934fa24..8d5c2a6895 100644 --- a/drivers/mempool/octeontx/octeontx_fpavf.c +++ b/drivers/mempool/octeontx/octeontx_fpavf.c @@ -523,8 +523,7 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count, int res; RTE_SET_USED(node_id); - FPAVF_STATIC_ASSERTION(sizeof(struct rte_mbuf) <= - OCTEONTX_FPAVF_BUF_OFFSET); + RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) > OCTEONTX_FPAVF_BUF_OFFSET); if (unlikely(*va_start == NULL)) goto error_end; diff --git a/drivers/mempool/octeontx/octeontx_fpavf.h b/drivers/mempool/octeontx/octeontx_fpavf.h index 263f733d8f..7a39cd22c7 100644 --- a/drivers/mempool/octeontx/octeontx_fpavf.h +++ b/drivers/mempool/octeontx/octeontx_fpavf.h @@ -92,8 +92,6 @@ #define FPA_MAX_OBJ_SIZE (128 * 1024) #define OCTEONTX_FPAVF_BUF_OFFSET 128 -#define FPAVF_STATIC_ASSERTION(s) _Static_assert(s, #s) - /* * In Cavium OcteonTX SoC, all accesses to the device registers are * implicitly strongly ordered. So, the relaxed version of IO operation is