#include <stdint.h>
#include <errno.h>
-#ifdef __GLIBC__
+#ifdef RTE_EXEC_ENV_LINUX
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#error "Undefined endianness"
#endif
-#else
+#else /* !RTE_EXEC_ENV_LINUX */
#error Environment not supported!
#endif
#define __maybe_unused __rte_unused
#endif
-#if defined(__GLIBC__) && !defined(pr_debug)
+#if !defined(pr_debug)
#if !defined(SUPPRESS_PRINTS) && defined(RTA_DEBUG)
#define pr_debug(fmt, ...) \
RTE_LOG(DEBUG, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
#endif
#endif /* pr_debug */
-#if defined(__GLIBC__) && !defined(pr_err)
+#if !defined(pr_err)
#if !defined(SUPPRESS_PRINTS)
#define pr_err(fmt, ...) \
RTE_LOG(ERR, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
#endif
#endif /* pr_err */
-#if defined(__GLIBC__) && !defined(pr_warn)
+#if !defined(pr_warn)
#if !defined(SUPPRESS_PRINTS)
#define pr_warn(fmt, ...) \
RTE_LOG(WARNING, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
#endif
/* Use Linux naming convention */
-#ifdef __GLIBC__
+#if defined(RTE_EXEC_ENV_LINUX) || defined(__GLIBC__)
#define swab16(x) rte_bswap16(x)
#define swab32(x) rte_bswap32(x)
#define swab64(x) rte_bswap64(x)