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.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/mesalib/src/glsl/main.cpp b/mesalib/src/glsl/main.cpp
index c445fb2b5..a51062456 100644
--- a/mesalib/src/glsl/main.cpp
+++ b/mesalib/src/glsl/main.cpp
@@ -22,7 +22,18 @@
*/
#include <cstdlib>
#include <cstdio>
+#include <io.h>
+
+#ifdef _MSC_VER
+#define __STDC__ 1
#include <getopt.h>
+#define open _open
+#define read _read
+#define fstat _fstat
+#define stat _stat
+#define close _close
+#define O_RDONLY _O_RDONLY
+#endif
#include "ast.h"
#include "glsl_parser_extras.h"