--- sound.cc	2018-07-31 14:02:19.000000000 -0400
+++ sound.cc	2019-11-12 20:18:49.000000000 -0500
@@ -38,7 +38,12 @@
 #include <math.h>
 #include <limits.h>
 #include <gst/gst.h>
-#include <endian.h>
+
+#if defined(__APPLE__) && defined(__MACH__)
+# include  <machine/endian.h>
+#else
+#include    <endian.h>
+#endif
 
 #include "sound.h"
 #include "global.h"
