[v2,13/21] drivers/bus: 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>
---
drivers/bus/dpaa/dpaa_bus.c | 3 ++-
drivers/bus/fslmc/fslmc_bus.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
@@ -4,6 +4,7 @@
*
*/
/* System headers */
+#include <stdalign.h>
#include <stdio.h>
#include <inttypes.h>
#include <unistd.h>
@@ -307,7 +308,7 @@ int rte_dpaa_portal_init(void *arg)
static const struct rte_mbuf_dynfield dpaa_seqn_dynfield_desc = {
.name = DPAA_SEQN_DYNFIELD_NAME,
.size = sizeof(dpaa_seqn_t),
- .align = __alignof__(dpaa_seqn_t),
+ .align = alignof(dpaa_seqn_t),
};
unsigned int cpu, lcore = rte_lcore_id();
int ret;
@@ -6,6 +6,7 @@
#include <string.h>
#include <dirent.h>
+#include <stdalign.h>
#include <stdbool.h>
#include <rte_log.h>
@@ -395,7 +396,7 @@
static const struct rte_mbuf_dynfield dpaa2_seqn_dynfield_desc = {
.name = DPAA2_SEQN_DYNFIELD_NAME,
.size = sizeof(dpaa2_seqn_t),
- .align = __alignof__(dpaa2_seqn_t),
+ .align = alignof(dpaa2_seqn_t),
};
if (TAILQ_EMPTY(&rte_fslmc_bus.device_list))