aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir.h4
-rw-r--r--src/compiler/nir/nir_print.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index b6bc3fa7c20..2a9ab542f6e 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -47,6 +47,10 @@
#include "nir_opcodes.h"
+#if defined(_WIN32) && !defined(snprintf)
+#define snprintf _snprintf
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index e6c5c9c830d..dfdb5f36191 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -31,10 +31,6 @@
#include <stdlib.h>
#include <inttypes.h> /* for PRIx64 macro */
-#if defined(_WIN32) && !defined(snprintf)
-#define snprintf _snprintf
-#endif
-
static void
print_tabs(unsigned num_tabs, FILE *fp)
{