From 7862946be647b02705f53036ebf74410c9d90bbd Mon Sep 17 00:00:00 2001 From: Sergii Romantsov Date: Thu, 10 Jan 2019 10:53:11 +0200 Subject: [PATCH] sna: fix of byteswap.h absence on bsd OpenBSD, FreeBSD and NetBSD don't contains file byteswap.h. Used specifics of them. Fixes: 746ab3bb131d (sna: Added AYUV format support for textured and sprite video adapters.) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109268 CC: Stanislav Lisovskiy CC: Chris Wilson Signed-off-by: Sergii Romantsov --- src/sna/sna_video.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c index cf28497..b7aa662 100644 --- a/src/sna/sna_video.c +++ b/src/sna/sna_video.c @@ -59,7 +59,17 @@ #include "intel_options.h" #include +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) +#include +#include +#ifdef __OpenBSD__ +#define bswap_32 swap32 +#else +#define bswap_32 bswap32 +#endif +#else #include +#endif #ifdef SNA_XVMC #define _SNA_XVMC_SERVER_ -- 2.7.4