[Mesa-dev] [PATCH 48/48] tests/vma: fix build with MSVC

Dylan Baker dylan at pnwbakers.com
Mon Jun 11 22:56:15 UTC 2018


---
 src/util/tests/vma/vma_random_test.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/util/tests/vma/vma_random_test.cpp b/src/util/tests/vma/vma_random_test.cpp
index de887fead30..26914a56d2c 100644
--- a/src/util/tests/vma/vma_random_test.cpp
+++ b/src/util/tests/vma/vma_random_test.cpp
@@ -34,7 +34,15 @@
 #include <set>
 #include <vector>
 
+#ifndef _WIN32
 #include <err.h>
+#else
+#define errx(code, msg, ...)             \
+   do {                                  \
+      fprintf(stderr, msg, __VA_ARGS__); \
+      exit(code);                        \
+   } while (0);
+#endif
 
 #include "vma.h"
 
-- 
2.17.1



More information about the mesa-dev mailing list