--- kmidi/config.h.orig	Mon Mar 29 21:24:38 1999
+++ kmidi/config.h	Wed Oct 25 00:16:44 2000
@@ -321,9 +321,9 @@
 #ifdef LITTLE_ENDIAN
 #define LE_SHORT(x) x
 #define LE_LONG(x) x
-#ifdef __FreeBSD__
-#define BE_SHORT(x) __byte_swap_word(x)
-#define BE_LONG(x) __byte_swap_long(x)
+#if defined(__FreeBSD__) && defined(__i386__)
+#define BE_SHORT(x) NTOHS(x)
+#define BE_LONG(x) NTOHL(x)
 #else
 #define BE_SHORT(x) XCHG_SHORT(x)
 #define BE_LONG(x) XCHG_LONG(x)
@@ -331,9 +331,9 @@
 #else
 #define BE_SHORT(x) x
 #define BE_LONG(x) x
-#ifdef __FreeBSD__
-#define LE_SHORT(x) __byte_swap_word(x)
-#define LE_LONG(x) __byte_swap_long(x)
+#if defined(__FreeBSD__) && defined(__i386__)
+#define LE_SHORT(x) NTOHS(x)
+#define LE_LONG(x) NTOHL(x)
 #else
 #define LE_SHORT(x) XCHG_SHORT(x)
 #define LE_LONG(x) XCHG_LONG(x)
