Date: Wed, 21 Oct 2020 17:01:47 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r552871 - head/graphics/mesa-devel/files Message-ID: <202010211701.09LH1luC017713@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Wed Oct 21 17:01:47 2020 New Revision: 552871 URL: https://svnweb.freebsd.org/changeset/ports/552871 Log: graphics/mesa-devel: fix build on big-endian architectures byteswap.h and bswap_32() don't exist on FreeBSD. Added: head/graphics/mesa-devel/files/patch-src_compiler_spirv_spirv__to__nir.c (contents, props changed) Added: head/graphics/mesa-devel/files/patch-src_compiler_spirv_spirv__to__nir.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/mesa-devel/files/patch-src_compiler_spirv_spirv__to__nir.c Wed Oct 21 17:01:47 2020 (r552871) @@ -0,0 +1,24 @@ +--- src/compiler/spirv/spirv_to_nir.c.orig 2020-10-21 16:03:29.994285000 +0200 ++++ src/compiler/spirv/spirv_to_nir.c 2020-10-21 18:45:12.746719000 +0200 +@@ -37,8 +37,12 @@ + + #include <stdio.h> + #if UTIL_ARCH_BIG_ENDIAN ++#ifdef __linux__ + #include <byteswap.h> ++#elif defined(__FreeBSD__) ++#include <sys/endian.h> + #endif ++#endif + + void + vtn_log(struct vtn_builder *b, enum nir_spirv_debug_level level, +@@ -415,7 +419,7 @@ + { + uint32_t *copy = ralloc_array(b, uint32_t, word_count); + for (unsigned i = 0; i < word_count; i++) +- copy[i] = bswap_32(words[i]); ++ copy[i] = bswap32(words[i]); + words = copy; + } + #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010211701.09LH1luC017713>