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: Akhil Goyal <gak...@marvell.com> Acked-by: Morten Brørup <m...@smartsharesystems.com> Acked-by: Chengwen Feng <fengcheng...@huawei.com> --- lib/security/rte_security.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c index b082a29..e5c862f 100644 --- a/lib/security/rte_security.c +++ b/lib/security/rte_security.c @@ -4,6 +4,7 @@ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved */ +#include <stdalign.h> #include <ctype.h> #include <stdlib.h> @@ -38,7 +39,7 @@ static const struct rte_mbuf_dynfield dynfield_desc = { .name = RTE_SECURITY_DYNFIELD_NAME, .size = sizeof(rte_security_dynfield_t), - .align = __alignof__(rte_security_dynfield_t), + .align = alignof(rte_security_dynfield_t), }; rte_security_dynfield_offset = rte_mbuf_dynfield_register(&dynfield_desc); @@ -51,7 +52,7 @@ static const struct rte_mbuf_dynfield dynfield_desc = { .name = RTE_SECURITY_OOP_DYNFIELD_NAME, .size = sizeof(rte_security_oop_dynfield_t), - .align = __alignof__(rte_security_oop_dynfield_t), + .align = alignof(rte_security_oop_dynfield_t), }; rte_security_oop_dynfield_offset = -- 1.8.3.1