tests/vma: fix build with MSVC
authorDylan Baker <dylan@pnwbakers.com>
Mon, 11 Jun 2018 22:11:07 +0000 (15:11 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Fri, 3 May 2019 17:58:27 +0000 (10:58 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/util/tests/vma/vma_random_test.cpp

index 1f194fcdf9221187b6efaeb459709f0642f2a304..9246176cbf2f220c245af0f878b8d074a81e6bdc 100644 (file)
 #include <set>
 #include <vector>
 
 #include <set>
 #include <vector>
 
+#ifndef _WIN32
 #include <err.h>
 #include <err.h>
+#else
+#define errx(code, msg, ...)             \
+   do {                                  \
+      fprintf(stderr, msg, __VA_ARGS__); \
+      exit(code);                        \
+   } while (0);
+#endif
 
 #include "vma.h"
 
 
 #include "vma.h"