From 926298e8220b43158c433c75ffca74909a33c42b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 13 Apr 2005 04:20:08 +0000 Subject: Fix build on FreeBSD-current, thanks to jhb@. --- bsd-core/drm_bufs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bsd-core') 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, -- cgit v1.2.3