void-packages/srcpkgs/kde-workspace/patches/q_byte_order.patch
Jürgen Buchmüller 238336d166 kde-workspace: unbreak musl
Closes #2223
2015-10-09 00:46:24 +02:00

27 lines
994 B
Diff

Use Qt defined macros Q_BYTE_ORDER, Q_BIG_ENDIAN and
Q_LITLLE_ENDIAN which are defined also for musl libc.
--- ksplash/ksplashx/scale.cpp 2015-05-07 20:13:26.000000000 +0200
+++ ksplash/ksplashx/scale.cpp 2015-10-09 00:07:44.940604940 +0200
@@ -165,18 +165,18 @@
// FIXME: replace with mRed, etc... These work on pointers to pixels, not
// pixel values
-#if BYTE_ORDER == BIG_ENDIAN
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
#define A_VAL(p) ((unsigned char *)(p))[0]
#define R_VAL(p) ((unsigned char *)(p))[1]
#define G_VAL(p) ((unsigned char *)(p))[2]
#define B_VAL(p) ((unsigned char *)(p))[3]
-#elif BYTE_ORDER == LITTLE_ENDIAN
+#elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN
#define A_VAL(p) ((unsigned char *)(p))[3]
#define R_VAL(p) ((unsigned char *)(p))[2]
#define G_VAL(p) ((unsigned char *)(p))[1]
#define B_VAL(p) ((unsigned char *)(p))[0]
#else
-#error "BYTE_ORDER is not defined"
+#error "Q_BYTE_ORDER is not defined"
#endif
#define INV_XAP (256 - xapoints[x])