diff options
| author | Tyler Retzlaff <[email protected]> | 2024-02-13 10:34:32 -0800 |
|---|---|---|
| committer | David Marchand <[email protected]> | 2024-02-14 13:41:29 +0100 |
| commit | 08966fe7f79fdaa5019b7559eebe84a1e3787b89 (patch) | |
| tree | 3160d933cadb5e3302ce255697f72c069775f9bc /lib/security | |
| parent | e578789d9886d2688c03db5ee9df926599248abd (diff) | |
use C11 alignof
Replace use of __alignof__(e) (resp. __alignof__(T) with C11
alignof(typeof(e)) (resp. alignof(T)) to improve portability
between toolchains.
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Chengwen Feng <[email protected]>
Acked-by: Anoob Joseph <[email protected]>
Acked-by: Volodymyr Fialko <[email protected]>
Acked-by: Akhil Goyal <[email protected]>
Acked-by: Ajit Khaparde <[email protected]>
Diffstat (limited to 'lib/security')
| -rw-r--r-- | lib/security/rte_security.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c index b082a29029..e5c862f5f5 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 @@ rte_security_dynfield_register(void) 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 @@ rte_security_oop_dynfield_register(void) 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 = |
