From 4dee75ff58a50559cb8a92c276c0b952c2776154 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Oct 2003 04:12:34 +0000 Subject: [PATCH] Wrap sys/endian.h usage with __FreeBSD_version >= 480000. Obtained from: i865-agp-0-1-branch --- bsd-core/drm_os_freebsd.h | 8 ++++++++ bsd/drm_os_freebsd.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/bsd-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h index 28751a24..a14383d7 100644 --- a/bsd-core/drm_os_freebsd.h +++ b/bsd-core/drm_os_freebsd.h @@ -55,7 +55,9 @@ #include #include #include +#if __FreeBSD_version >= 480000 #include +#endif #include #include #include @@ -83,6 +85,7 @@ #else #define __REALLY_HAVE_MTRR 0 #endif + #define __REALLY_HAVE_SG (__HAVE_SG) #if __REALLY_HAVE_AGP @@ -275,8 +278,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 28751a24..a14383d7 100644 --- a/bsd/drm_os_freebsd.h +++ b/bsd/drm_os_freebsd.h @@ -55,7 +55,9 @@ #include #include #include +#if __FreeBSD_version >= 480000 #include +#endif #include #include #include @@ -83,6 +85,7 @@ #else #define __REALLY_HAVE_MTRR 0 #endif + #define __REALLY_HAVE_SG (__HAVE_SG) #if __REALLY_HAVE_AGP @@ -275,8 +278,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;