summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkeithw <keithw>2003-09-29 16:58:22 +0000
committerkeithw <keithw>2003-09-29 16:58:22 +0000
commitf5c34a78c8c15b974b1c8ccae69ca02b1f90cbd9 (patch)
treeb73b9960eac50ddc2c6f4c891327327d6d8ffee5
parentbbd21a8f3268350127a0a0a41ff7de1b2daad77f (diff)
Version test for sys/endian.hi865-agp-0-1-20030929
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h
index 15e489398..6719153ce 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/drm_os_freebsd.h
@@ -27,7 +27,9 @@
#include <machine/pmap.h>
#include <machine/bus.h>
#include <machine/resource.h>
+#if __FreeBSD_version >= 480000
#include <sys/endian.h>
+#endif
#include <sys/mman.h>
#include <sys/rman.h>
#include <sys/memrange.h>
@@ -250,8 +252,13 @@ typedef struct drm_chipinfo
char *name;
} drm_chipinfo_t;
+#if __FreeBSD_version >= 480000
#define cpu_to_le32(x) htole32(x)
#define le32_to_cpu(x) le32toh(x)
+#else
+#define cpu_to_le32(x) (x)
+#define le32_to_cpu(x) (x)
+#endif
typedef unsigned long dma_addr_t;
typedef u_int32_t atomic_t;