summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drmP.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h
index 30e6be67..fbe1266c 100644
--- a/bsd-core/drmP.h
+++ b/bsd-core/drmP.h
@@ -331,8 +331,13 @@ typedef vaddr_t vm_offset_t;
copyin(arg2, arg1, arg3)
#define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \
copyout(arg2, arg1, arg3)
-#define DRM_GET_USER_UNCHECKED(val, uaddr) \
+#if __FreeBSD_version > 500000
+#define DRM_GET_USER_UNCHECKED(val, uaddr) \
+ ((val) = fuword32(uaddr), 0)
+#else
+#define DRM_GET_USER_UNCHECKED(val, uaddr) \
((val) = fuword(uaddr), 0)
+#endif
#define cpu_to_le32(x) htole32(x)
#define le32_to_cpu(x) le32toh(x)