[7/9] pdcp: use C11 alignof
Checks
Commit Message
Replace use of __alignof__(T) with C11 alignof(T) to improve portability
between toolchains.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/pdcp/rte_pdcp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
>
> External Email
>
> ----------------------------------------------------------------------
> Replace use of __alignof__(T) with C11 alignof(T) to improve portability
> between toolchains.
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
@@ -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)