summaryrefslogtreecommitdiff
path: root/src/ToolBox
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-02-18 23:41:56 +0100
committerKamil Rytarowski <n54@gmx.com>2016-04-13 08:56:05 +0200
commitfd1f866f28c71570a7ef80dd1159a5cd755f8bf3 (patch)
treef489f5cf35f33a8527a94e19c5d1a057c34aa136 /src/ToolBox
parentafdce3a592e5f6f2047bed057d121225be91743d (diff)
downloadcoreclr-fd1f866f28c71570a7ef80dd1159a5cd755f8bf3.tar.gz
coreclr-fd1f866f28c71570a7ef80dd1159a5cd755f8bf3.tar.bz2
coreclr-fd1f866f28c71570a7ef80dd1159a5cd755f8bf3.zip
Fix issue unveiled on NetBSD: Add PAL__vsnprintf shadow in PAL
NetBSD's libc internally uses a function named _vsnprintf. We need to mask PAL's version of this function to remove clash with the system. With it snprintf(3) calls were jumping out of libc and landing back to PAL. It was unveiled with many PAL tests. Detailed documentation about _symbols in the NetBSD libc is documented in the NetBSD sources in a file: src/lib/libc/README Retire unneeded _vsnprintf(). Thanks Jan Vorli (Microsoft) for help with debugging. Thanks Jan Kotas (Microsoft) for suggesting the right solution. Fix #3199
Diffstat (limited to 'src/ToolBox')
-rw-r--r--src/ToolBox/SOS/Strike/strike.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ToolBox/SOS/Strike/strike.h b/src/ToolBox/SOS/Strike/strike.h
index d6bd54dc54..f2aefa08b4 100644
--- a/src/ToolBox/SOS/Strike/strike.h
+++ b/src/ToolBox/SOS/Strike/strike.h
@@ -44,6 +44,10 @@
#define _wcsstr wcsstr
#endif // !PAL_STDCPP_COMPAT
+#ifdef PLATFORM_UNIX
+#define _vsnprintf vsnprintf
+#endif
+
#define ___in _SAL1_Source_(__in, (), _In_)
#define ___out _SAL1_Source_(__out, (), _Out_)