Replace use of __alignof__(T) with C11 alignof(T) to improve portability
between toolchains.

Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com>
Acked-by: Anoob Joseph <ano...@marvell.com>
Acked-by: Morten Brørup <m...@smartsharesystems.com>
Acked-by: Chengwen Feng <fengcheng...@huawei.com>
---
 lib/pdcp/rte_pdcp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/pdcp/rte_pdcp.c b/lib/pdcp/rte_pdcp.c
index 1c6d246..1c076fb 100644
--- a/lib/pdcp/rte_pdcp.c
+++ b/lib/pdcp/rte_pdcp.c
@@ -2,6 +2,8 @@
  * Copyright(C) 2023 Marvell.
  */
 
+#include <stdalign.h>
+
 #include <rte_errno.h>
 #include <rte_pdcp.h>
 #include <rte_malloc.h>
@@ -32,7 +34,7 @@ struct entity_layout {
        const struct rte_mbuf_dynfield dynfield_desc = {
                .name = RTE_PDCP_DYNFIELD_NAME,
                .size = sizeof(rte_pdcp_dynfield_t),
-               .align = __alignof__(rte_pdcp_dynfield_t),
+               .align = alignof(rte_pdcp_dynfield_t),
        };
 
        if (rte_pdcp_dynfield_offset != -1)
-- 
1.8.3.1

Reply via email to