svga: fix build on FreeBSD

MADV_HUGEPAGE only exists on Linux

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3966>
This commit is contained in:
Greg V 2020-02-26 23:14:00 +03:00 committed by Marge Bot
parent 9ce4db6231
commit 924f3f3de7
1 changed files with 3 additions and 0 deletions

View File

@ -694,7 +694,10 @@ vmw_ioctl_region_map(struct vmw_region *region)
return NULL;
}
// MADV_HUGEPAGE only exists on Linux
#ifdef MADV_HUGEPAGE
(void) madvise(map, region->size, MADV_HUGEPAGE);
#endif
region->data = map;
}