summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-04-13 04:20:08 +0000
committerEric Anholt <anholt@freebsd.org>2005-04-13 04:20:08 +0000
commit926298e8220b43158c433c75ffca74909a33c42b (patch)
tree6fd7304e3becfccd405a9695d246bc3e880ebcbe /bsd-core
parenta0454aba714ba0314b85faad2801f7b047fa3b02 (diff)
Fix build on FreeBSD-current, thanks to jhb@.
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drm_bufs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c
index 9dcb2bb8..135cada2 100644
--- a/bsd-core/drm_bufs.c
+++ b/bsd-core/drm_bufs.c
@@ -979,8 +979,13 @@ int drm_mapbufs(DRM_IOCTL_ARGS)
#ifdef __FreeBSD__
vaddr = round_page((vm_offset_t)vms->vm_daddr + MAXDSIZ);
+#if __FreeBSD_version >= 600023
+ retcode = vm_mmap(&vms->vm_map, &vaddr, size, PROT_READ | PROT_WRITE,
+ VM_PROT_ALL, MAP_SHARED, OBJT_DEVICE, kdev, foff );
+#else
retcode = vm_mmap(&vms->vm_map, &vaddr, size, PROT_READ | PROT_WRITE,
VM_PROT_ALL, MAP_SHARED, SLIST_FIRST(&kdev->si_hlist), foff );
+#endif
#elif defined(__NetBSD__) || defined(__OpenBSD__)
vaddr = round_page((vaddr_t)vms->vm_daddr + MAXDSIZ);
retcode = uvm_mmap(&vms->vm_map, &vaddr, size,