Mesa (master): svga: fix build on FreeBSD

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 14 00:04:36 UTC 2020


Module: Mesa
Branch: master
Commit: 924f3f3de72a05dac1757e29b971cc680349b18b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=924f3f3de72a05dac1757e29b971cc680349b18b

Author: Greg V <greg at unrelenting.technology>
Date:   Wed Feb 26 23:14:00 2020 +0300

svga: fix build on FreeBSD

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 | 3 +++
 1 file changed, 3 insertions(+)

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;
    }
 



More information about the mesa-commit mailing list