aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/main.cpp')
-rw-r--r--mesalib/src/glsl/main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/mesalib/src/glsl/main.cpp b/mesalib/src/glsl/main.cpp
index 94c14a58a..b51b2405c 100644
--- a/mesalib/src/glsl/main.cpp
+++ b/mesalib/src/glsl/main.cpp
@@ -22,7 +22,19 @@
*/
#include <cstdlib>
#include <cstdio>
+#include <io.h>
+
+#ifdef _MSC_VER
+#define __STDC__ 1
#include <getopt.h>
+typedef size_t ssize_t;
+#define open _open
+#define read _read
+#define fstat _fstat
+#define stat _stat
+#define close _close
+#define O_RDONLY _O_RDONLY
+#endif
#include <sys/types.h>
#include <sys/stat.h>