svga: fix build on FreeBSD
authorGreg V <greg@unrelenting.technology>
Wed, 26 Feb 2020 20:14:00 +0000 (23:14 +0300)
committerMarge Bot <eric+marge@anholt.net>
Mon, 13 Apr 2020 23:51:43 +0000 (23:51 +0000)
MADV_HUGEPAGE only exists on Linux

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3966>

src/gallium/winsys/svga/drm/vmw_screen_ioctl.c

index 6f987ba059dab9d8ceb93fb51f465273446c3d81..9696f884e4fd37c4909fa87dd1e702dda34f533a 100644 (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;
    }