From 1bc095bd753cca46c9bd7c9b4270caa074a7e16f Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Thu, 16 Jul 2020 14:20:12 +0000 Subject: [PATCH] pixels: detect endianness via compiler defines ../src/pixels.c:24:10: fatal error: 'endian.h' file not found #include ^~~~~~~~~~ ../src/pixels.c:58:6: error: expected value in expression #elif ^ --- src/pixels.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pixels.c b/src/pixels.c index 93a875a..0d49b91 100644 --- a/src/pixels.c +++ b/src/pixels.c @@ -21,7 +21,6 @@ #include #include #include -#include enum wl_shm_format fourcc_to_wl_shm(uint32_t in) { @@ -52,11 +51,11 @@ bool fourcc_to_pixman_fmt(pixman_format_code_t* dst, uint32_t src) #define FMT_DRM(x, y, z, v, a, b, c, d) DRM_FORMAT_##x##y##z##v##a##b##c##d -#if __BYTE_ORDER == __LITTLE_ENDIAN +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define FMT_PIXMAN(x, y, z, v, a, b, c, d) \ CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(\ PIXMAN_, LOWER(x)), a), LOWER(y)), b), LOWER(z)), c), LOWER(v)), d) -#elif +#else #define FMT_PIXMAN(x, y, z, v, a, b, c, d) \ CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(\ PIXMAN_, LOWER(v)), d), LOWER(z)), c), LOWER(y)), b), LOWER(x)), a)