aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2015-09-30 20:38:13 +0300
committerTapani Pälli <[email protected]>2015-10-01 08:01:03 +0300
commitca2e16d26ec46e604c76ab72d3ec14a7a8643cc8 (patch)
treea3930893cb1cc54b36b46eff7d30c06ad969bc55
parent9bd9cf1fa402bf948020ee5d560259a5cfd2a739 (diff)
mesa: use strtok_s for strtok_r on windows
https://msdn.microsoft.com/en-us/library/ftsafwz3.aspx v2: use _WIN32 instead of _MSC_VER (Brian Paul) Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92183 Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/main/imports.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index d61279ac4e5..90247587be3 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -423,6 +423,9 @@ _mesa_vsnprintf(char *str, size_t size, const char *fmt, va_list arg);
#define snprintf _snprintf
#endif
+#if defined(_WIN32) && !defined(strtok_r)
+#define strtok_r strtok_s
+#endif
#ifdef __cplusplus
}