diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-02-07 16:15:30 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-02-12 17:55:53 +0000 |
commit | 32cf9412c58d339066e091ad088126e1236b52dd (patch) | |
tree | a80a408746d99c496ba94cf9ea21279cdb6bf1d6 /graphics/bgfx | |
parent | 7f04ef6336dc16b181f6d605fd572733257ad729 (diff) | |
download | ports-32cf9412c58d339066e091ad088126e1236b52dd.tar.gz ports-32cf9412c58d339066e091ad088126e1236b52dd.zip |
graphics/bgfx: fix build on powerpc64* and probably riscv64
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:173:10: error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses information
if (reinterpret_cast<uint32>(ptr) == 0xcccccccc) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:174:10: error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses information
if (reinterpret_cast<uint32>(ptr) == 0xcdcdcdcd) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:175:10: error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses information
if (reinterpret_cast<uint32>(ptr) == 0xdddddddd) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:176:10: error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses information
if (reinterpret_cast<uint32>(ptr) == 0xffffffff) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'graphics/bgfx')
-rw-r--r-- | graphics/bgfx/files/patch-bimg_3rdparty_nvtt_nvcore_debug.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/bgfx/files/patch-bimg_3rdparty_nvtt_nvcore_debug.h b/graphics/bgfx/files/patch-bimg_3rdparty_nvtt_nvcore_debug.h new file mode 100644 index 000000000000..b017509dac6f --- /dev/null +++ b/graphics/bgfx/files/patch-bimg_3rdparty_nvtt_nvcore_debug.h @@ -0,0 +1,11 @@ +--- bimg/3rdparty/nvtt/nvcore/debug.h.orig 2023-02-07 16:06:32 UTC ++++ bimg/3rdparty/nvtt/nvcore/debug.h +@@ -165,7 +165,7 @@ namespace nv + namespace nv + { + inline bool isValidPtr(const void * ptr) { +- #if NV_CPU_X86_64 || NV_CPU_AARCH64 ++ #if defined(__LP64__) + if (ptr == NULL) return true; + if (reinterpret_cast<uint64>(ptr) < 0x10000ULL) return false; + if (reinterpret_cast<uint64>(ptr) >= 0x000007FFFFFEFFFFULL) return false; |