summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ports/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/ports/bsd')
-rw-r--r--media/libstagefright/ports/bsd/include/byteswap.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/media/libstagefright/ports/bsd/include/byteswap.h b/media/libstagefright/ports/bsd/include/byteswap.h
new file mode 100644
index 000000000..5bd379a8c
--- /dev/null
+++ b/media/libstagefright/ports/bsd/include/byteswap.h
@@ -0,0 +1,15 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+#ifndef BYTESWAP_H_
+#define BYTESWAP_H_
+
+#include <sys/endian.h>
+
+#ifdef __OpenBSD__
+#define bswap_16(x) swap16(x)
+#else
+#define bswap_16(x) bswap16(x)
+#endif
+
+#endif