From: Greg V Date: Wed, 26 Feb 2020 20:14:00 +0000 (+0300) Subject: svga: fix build on FreeBSD X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=924f3f3de72a05dac1757e29b971cc680349b18b;p=mesa.git svga: fix build on FreeBSD MADV_HUGEPAGE only exists on Linux Part-of: --- 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; }