Date: Fri, 16 Sep 2022 22:22:46 GMT From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: aed3a7bf4e82 - main - graphics/igt-gpu-tools: fix build on big-endian Message-ID: <202209162222.28GMMk7Z075196@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=aed3a7bf4e82969d372a32ed107a75dabee37b80 commit aed3a7bf4e82969d372a32ed107a75dabee37b80 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2022-09-16 21:02:37 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2022-09-16 21:02:37 +0000 graphics/igt-gpu-tools: fix build on big-endian ../lib/igt_fb.c:4476:21: error: implicit declaration of function 'bswap_32' is invalid in C99 [-Werror,-Wimplicit-function-declaration] uint32_t pixel = le32_to_cpu(line[x]); ^ ../lib/igt_core.h:1459:25: note: expanded from macro 'le32_to_cpu' --- graphics/igt-gpu-tools/files/patch-lib_igt__core.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/graphics/igt-gpu-tools/files/patch-lib_igt__core.h b/graphics/igt-gpu-tools/files/patch-lib_igt__core.h index 42c8b79da821..38659894f470 100644 --- a/graphics/igt-gpu-tools/files/patch-lib_igt__core.h +++ b/graphics/igt-gpu-tools/files/patch-lib_igt__core.h @@ -1,16 +1,18 @@ ---- lib/igt_core.h.orig 2022-08-31 20:00:01 UTC +--- lib/igt_core.h.orig 2022-08-30 07:06:59 UTC +++ lib/igt_core.h -@@ -31,7 +31,9 @@ +@@ -31,7 +31,11 @@ #define IGT_CORE_H #include <assert.h> +#ifdef __linux__ #include <byteswap.h> ++#elif defined(__FreeBSD__) ++#include <sys/endian.h> +#endif #include <setjmp.h> #include <stdbool.h> #include <stdint.h> -@@ -47,6 +49,10 @@ +@@ -47,6 +51,10 @@ #define IGT_LOG_DOMAIN (NULL) #endif @@ -21,3 +23,14 @@ #ifndef STATIC_ANALYSIS_BUILD #if defined(__clang_analyzer__) || defined(__COVERITY__) || defined(__KLOCWORK__) +@@ -1449,8 +1457,8 @@ void igt_kmsg(const char *format, ...); + #define WRITE_ONCE(x, v) do *(volatile typeof(x) *)(&(x)) = (v); while (0) + + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +-#define cpu_to_le32(x) bswap_32(x) +-#define le32_to_cpu(x) bswap_32(x) ++#define cpu_to_le32(x) bswap32(x) ++#define le32_to_cpu(x) bswap32(x) + #else + #define cpu_to_le32(x) (x) + #define le32_to_cpu(x) (x)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209162222.28GMMk7Z075196>