[PATCH v1] sna: fix of byteswap.h absence on bsd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <stanislav.lisovskiy@xxxxxxxxx>
CC: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Sergii Romantsov <sergii.romantsov@xxxxxxxxxxxxxxx>
---
 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 <xf86xv.h>
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#include <sys/types.h>
+#include <sys/endian.h>
+#ifdef __OpenBSD__
+#define bswap_32 swap32
+#else
+#define bswap_32 bswap32
+#endif
+#else
 #include <byteswap.h>
+#endif
 
 #ifdef SNA_XVMC
 #define _SNA_XVMC_SERVER_
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux