From 985553dff9d9de255edb6acb0ae85117ceb3e76c Mon Sep 17 00:00:00 2001 From: Sergii Romantsov Date: Thu, 10 Jan 2019 11:42:45 +0200 Subject: 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 cf284975..b7aa6624 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_ -- cgit v1.2.3