Skip to content
Snippets Groups Projects
Commit f38fcc12 authored by Keith Whitwell's avatar Keith Whitwell
Browse files

Version test for sys/endian.h

parent 6ead98e0
No related branches found
Tags xorg-server-1.12.1.902
Loading
......@@ -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;
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment