[v2,11/21] examples: 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>
---
examples/bbdev_app/main.c | 3 ++-
examples/rxtx_callbacks/main.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
@@ -2,6 +2,7 @@
* Copyright(c) 2017 Intel Corporation
*/
+#include <stdalign.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1051,7 +1052,7 @@ uint16_t bbdev_parse_number(const char *mask)
static const struct rte_mbuf_dynfield input_dynfield_desc = {
.name = "example_bbdev_dynfield_input",
.size = sizeof(struct rte_mbuf *),
- .align = __alignof__(struct rte_mbuf *),
+ .align = alignof(struct rte_mbuf *),
};
__atomic_store_n(&global_exit_flag, 0, __ATOMIC_RELAXED);
@@ -2,6 +2,7 @@
* Copyright(c) 2010-2015 Intel Corporation
*/
+#include <stdalign.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
@@ -292,7 +293,7 @@
static const struct rte_mbuf_dynfield tsc_dynfield_desc = {
.name = "example_bbdev_dynfield_tsc",
.size = sizeof(tsc_t),
- .align = __alignof__(tsc_t),
+ .align = alignof(tsc_t),
};
/* init EAL */