From 1a11efec586d3cc7b4652a659829bd18a4571c61 Mon Sep 17 00:00:00 2001
From: Raivo Hool <raivo.hool@gmail.com>
Date: Wed, 23 Feb 2011 20:44:49 +0100
Subject: [PATCH] Use sys/endian.h on FreeBSD

---
 src/raop.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/raop.c b/src/raop.c
index c971d536..ae1b1743 100644
--- a/src/raop.c
+++ b/src/raop.c
@@ -46,7 +46,13 @@
 #include <netdb.h>
 #include <fcntl.h>
 #include <time.h>
-#include <endian.h>
+
+#if defined(__linux__) || defined(__GLIBC__)
+# include <endian.h>
+# include <byteswap.h>
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+# include <sys/endian.h>
+#endif
 
 #include <arpa/inet.h>
 #include <net/if.h>