[PATCH 8/9] reorder: use C11 alignof
Tyler Retzlaff
roretzla at linux.microsoft.com
Thu Jan 25 00:17:55 CET 2024
Replace use of __alignof__(T) with C11 alignof(T) to improve portability
between toolchains.
Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
lib/reorder/rte_reorder.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c
index ff81544..c080b2c 100644
--- a/lib/reorder/rte_reorder.c
+++ b/lib/reorder/rte_reorder.c
@@ -2,6 +2,7 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include <stdalign.h>
#include <string.h>
#include <sys/queue.h>
@@ -72,7 +73,7 @@ struct rte_reorder_buffer *
static const struct rte_mbuf_dynfield reorder_seqn_dynfield_desc = {
.name = RTE_REORDER_SEQN_DYNFIELD_NAME,
.size = sizeof(rte_reorder_seqn_t),
- .align = __alignof__(rte_reorder_seqn_t),
+ .align = alignof(rte_reorder_seqn_t),
};
if (b == NULL) {
--
1.8.3.1
More information about the dev
mailing list