From 924f3f3de72a05dac1757e29b971cc680349b18b Mon Sep 17 00:00:00 2001 From: Greg V Date: Wed, 26 Feb 2020 23:14:00 +0300 Subject: svga: fix build on FreeBSD MADV_HUGEPAGE only exists on Linux Part-of: --- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/winsys/svga') diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c index 6f987ba059d..9696f884e4f 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c @@ -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; } -- cgit v1.2.3