summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-09-29 16:58:22 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-09-29 16:58:22 +0000
commitf38fcc12bc3eb25b694c503e15f8011abbc0cd85 (patch)
tree525e5af5bf78ea7a2097182b6998b2ab360ca3c8
parent6ead98e0fb467ad4a6d5129fac2e39885c779d0a (diff)
Version test for sys/endian.hi865-agp-0-1-20030929i865-agp-0-1-branch
-rw-r--r--bsd-core/drm_os_freebsd.h7
-rw-r--r--bsd/drm_os_freebsd.h7
2 files changed, 14 insertions, 0 deletions
diff --git a/bsd-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h
index 15e48939..6719153c 100644
--- a/bsd-core/drm_os_freebsd.h
+++ b/bsd-core/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;
diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h
index 15e48939..6719153c 100644
--- a/bsd/drm_os_freebsd.h
+++ b/bsd/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;