summaryrefslogtreecommitdiffstats
path: root/kttsd/players/alsaplayer
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-01-26 17:06:34 +0100
committerSlávek Banko <slavek.banko@axis.cz>2021-01-26 17:06:50 +0100
commit4c1c777ca09bdf54dca7363f69604eb954e993d3 (patch)
tree9770bc9c75b511b0542af967dc3656d13e91a05e /kttsd/players/alsaplayer
parentd1dc3998e9db7a0284f06bf8186a00a292fea13d (diff)
downloadtdeaccessibility-4c1c777ca09bdf54dca7363f69604eb954e993d3.tar.gz
tdeaccessibility-4c1c777ca09bdf54dca7363f69604eb954e993d3.zip
Define byteswap functions for FreeBSD and NetBSD.
This resolves FTBFS for kttsd alsaplayer. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 32f9e36ff092405084dbf49224ec60092e37b08f)
Diffstat (limited to 'kttsd/players/alsaplayer')
-rw-r--r--kttsd/players/alsaplayer/formats.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/kttsd/players/alsaplayer/formats.h b/kttsd/players/alsaplayer/formats.h
index 2c4f724..e70380f 100644
--- a/kttsd/players/alsaplayer/formats.h
+++ b/kttsd/players/alsaplayer/formats.h
@@ -1,8 +1,15 @@
#ifndef FORMATS_H
#define FORMATS_H 1
-#include <endian.h>
-#include <byteswap.h>
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+# include <sys/endian.h>
+# define bswap_16(x) bswap16(x)
+# define bswap_32(x) bswap32(x)
+# define bswap_64(x) bswap64(x)
+#else
+# include <endian.h>
+# include <byteswap.h>
+#endif
/* Definitions for .VOC files */