Bug 1169034 - include <cstdlib> in ThreadStackHelper.cpp to declare correct overload for std::abs; r=jseward
authorNathan Froyd <froydnj@mozilla.com>
Wed, 27 May 2015 16:54:38 -0400
changeset 246395 1764c92482b6ab6b464b52219e286e8fb3d673a8
parent 246394 c93207523028cd304f21353edafdc6f36767ab5f
child 246396 5b6a2c834d801d86e44cac4a0ed5e8b0ef7de70e
push id60423
push usernfroyd@mozilla.com
push dateFri, 29 May 2015 22:08:43 +0000
treeherdermozilla-inbound@1764c92482b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjseward
bugs1169034
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1169034 - include <cstdlib> in ThreadStackHelper.cpp to declare correct overload for std::abs; r=jseward The integer-valued {,l,ll}abs functions come from <stdlib.h>, and so the integer-valued overload for std::abs comes from <cstdlib>.
xpcom/threads/ThreadStackHelper.cpp
--- a/xpcom/threads/ThreadStackHelper.cpp
+++ b/xpcom/threads/ThreadStackHelper.cpp
@@ -39,16 +39,17 @@
 #endif
 
 #if defined(MOZ_VALGRIND)
 # include <valgrind/valgrind.h>
 #endif
 
 #include <string.h>
 #include <vector>
+#include <cstdlib>
 
 #ifdef XP_LINUX
 #ifdef ANDROID
 // Android NDK doesn't contain ucontext.h; use Breakpad's copy.
 # include "common/android/include/sys/ucontext.h"
 #else
 # include <ucontext.h>
 #endif