[5/9] stack: use C11 alignof
Checks
Commit Message
Replace use of __alignof__(e) with C11 alignof(typeof(e)) to improve
portability between toolchains.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/stack/rte_stack.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -2,6 +2,7 @@
* Copyright(c) 2019 Intel Corporation
*/
+#include <stdalign.h>
#include <string.h>
#include <sys/queue.h>
@@ -90,7 +91,7 @@ struct rte_stack *
rte_mcfg_tailq_write_lock();
mz = rte_memzone_reserve_aligned(mz_name, sz, socket_id,
- 0, __alignof__(*s));
+ 0, alignof(typeof(*s)));
if (mz == NULL) {
STACK_LOG_ERR("Cannot reserve stack memzone!");
rte_mcfg_tailq_write_unlock();