Skip to content

Commit

Permalink
www/firefox: fix build on powerpc64
Browse files Browse the repository at this point in the history
Cast to uint32_t on big-endian, since byte-swapping to big-endian function, which returns uint32_t, doesn't run on big-endian:
/wrkdirs/usr/ports/www/firefox/work/firefox-114.0.1/gfx/skia/skia/src/encode/SkICC.cpp:122:13: error: non-constant-expression cannot be narrowed from type 'SkFixed' (aka 'int') to 'uint32_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
  • Loading branch information
pkubaj committed Jun 16, 2023
1 parent a7aaffb commit 3110f3a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions www/firefox/files/patch-gfx_skia_skia_src_base_SkEndian.h
@@ -0,0 +1,11 @@
--- gfx/skia/skia/src/base/SkEndian.h.orig 2023-06-16 01:32:16.999830000 +0200
+++ gfx/skia/skia/src/base/SkEndian.h 2023-06-16 01:32:41.701673000 +0200
@@ -131,7 +131,7 @@
#define SkTEndian_SwapLE64(n) (n)
#else // SK_CPU_BENDIAN
#define SkEndian_SwapBE16(n) (n)
- #define SkEndian_SwapBE32(n) (n)
+ #define SkEndian_SwapBE32(n) uint32_t(n)
#define SkEndian_SwapBE64(n) (n)
#define SkEndian_SwapLE16(n) SkEndianSwap16(n)
#define SkEndian_SwapLE32(n) SkEndianSwap32(n)

0 comments on commit 3110f3a

Please sign in to comment.