Index: gears/geolocation/backoff_manager.cc
===================================================================
--- gears/geolocation/backoff_manager.cc	(revision 3331)
+++ gears/geolocation/backoff_manager.cc	(working copy)
@@ -25,6 +25,7 @@
 
 #include "gears/geolocation/backoff_manager.h"
 
+#include <stdlib.h>
 #include <assert.h>
 
 // The baseline minimum period between network requests.
Index: gears/cctests/test.cc
===================================================================
--- gears/cctests/test.cc	(revision 3331)
+++ gears/cctests/test.cc	(working copy)
@@ -700,15 +700,15 @@
 
   bool ok = false;
   JsParamType t = context->GetArgumentType(1);
-  if (type == STRING16(L"bool") && t == JSPARAM_BOOL ||
-      type == STRING16(L"int") && t == JSPARAM_INT ||
-      type == STRING16(L"double") && t == JSPARAM_DOUBLE ||
-      type == STRING16(L"string") && t == JSPARAM_STRING16 ||
-      type == STRING16(L"null") && t == JSPARAM_NULL ||
-      type == STRING16(L"undefined") && t == JSPARAM_UNDEFINED ||
-      type == STRING16(L"array") && t == JSPARAM_ARRAY ||
-      type == STRING16(L"function") && t == JSPARAM_FUNCTION ||
-      type == STRING16(L"object") && t == JSPARAM_OBJECT) {
+  if ((type == STRING16(L"bool") && t == JSPARAM_BOOL) ||
+      (type == STRING16(L"int") && t == JSPARAM_INT) ||
+      (type == STRING16(L"double") && t == JSPARAM_DOUBLE) ||
+      (type == STRING16(L"string") && t == JSPARAM_STRING16) ||
+      (type == STRING16(L"null") && t == JSPARAM_NULL) ||
+      (type == STRING16(L"undefined") && t == JSPARAM_UNDEFINED) ||
+      (type == STRING16(L"array") && t == JSPARAM_ARRAY) ||
+      (type == STRING16(L"function") && t == JSPARAM_FUNCTION) ||
+      (type == STRING16(L"object") && t == JSPARAM_OBJECT)) {
     ok = true;
   }
   context->SetReturnValue(JSPARAM_BOOL, &ok);
Index: gears/desktop/desktop.cc
===================================================================
--- gears/desktop/desktop.cc	(revision 3331)
+++ gears/desktop/desktop.cc	(working copy)
@@ -216,14 +216,14 @@
   }
 
   // Resolve the icon urls
-  if (!shortcut_info->icon16x16.url.empty() &&
-      !ResolveUrl(&shortcut_info->icon16x16.url, &error_) ||
-      !shortcut_info->icon32x32.url.empty() &&
-      !ResolveUrl(&shortcut_info->icon32x32.url, &error_) ||
-      !shortcut_info->icon48x48.url.empty() &&
-      !ResolveUrl(&shortcut_info->icon48x48.url, &error_) ||
-      !shortcut_info->icon128x128.url.empty() &&
-      !ResolveUrl(&shortcut_info->icon128x128.url, &error_)) {
+  if ((!shortcut_info->icon16x16.url.empty() &&
+      !ResolveUrl(&shortcut_info->icon16x16.url, &error_)) ||
+      (!shortcut_info->icon32x32.url.empty() &&
+      !ResolveUrl(&shortcut_info->icon32x32.url, &error_)) ||
+      (!shortcut_info->icon48x48.url.empty() &&
+      !ResolveUrl(&shortcut_info->icon48x48.url, &error_)) ||
+      (!shortcut_info->icon128x128.url.empty() &&
+      !ResolveUrl(&shortcut_info->icon128x128.url, &error_))) {
     return false;
   }
 
Index: gears/base/common/string16.h
===================================================================
--- gears/base/common/string16.h	(revision 3331)
+++ gears/base/common/string16.h	(working copy)
@@ -45,6 +45,7 @@
 #ifndef GEARS_BASE_COMMON_STRING16_H__
 #define GEARS_BASE_COMMON_STRING16_H__
 
+#include <string.h>
 #include <string>
 #include "gears/base/common/basictypes.h"
 
Index: gears/base/common/string_utils.cc
===================================================================
--- gears/base/common/string_utils.cc	(revision 3331)
+++ gears/base/common/string_utils.cc	(working copy)
@@ -25,6 +25,7 @@
 
 #include "gears/base/common/string_utils.h"
 #include "third_party/convert_utf/ConvertUTF.h"
+#include <limits.h>
 
 #if defined(OS_ANDROID)
 // Android is missing wcslen. This is just a wide character strlen.
Index: gears/base/common/http_utils.cc
===================================================================
--- gears/base/common/http_utils.cc	(revision 3331)
+++ gears/base/common/http_utils.cc	(working copy)
@@ -25,6 +25,7 @@
 //
 // This file is branched from /google3/webutil/http/httputils.cc
 
+#include <stdlib.h>
 #include <iterator>
 #include <vector>
 #include "gears/base/common/http_utils.h"
Index: third_party/jsoncpp/json_reader.cc
===================================================================
--- third_party/jsoncpp/json_reader.cc	(revision 3331)
+++ third_party/jsoncpp/json_reader.cc	(working copy)
@@ -2,6 +2,7 @@
 #include "third_party/jsoncpp/value.h"
 #include <utility>
 #include <stdio.h>
+#include <string.h>
 #include <assert.h>
 
 #if _MSC_VER >= 1400 // VC++ 8.0
Index: third_party/jsoncpp/json_writer.cc
===================================================================
--- third_party/jsoncpp/json_writer.cc	(revision 3331)
+++ third_party/jsoncpp/json_writer.cc	(working copy)
@@ -2,6 +2,7 @@
 #include <utility>
 #include <assert.h>
 #include <stdio.h>
+#include <string.h>
 
 #if _MSC_VER >= 1400 // VC++ 8.0
 #pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
Index: third_party/jsoncpp/json_value.cc
===================================================================
--- third_party/jsoncpp/json_value.cc	(revision 3331)
+++ third_party/jsoncpp/json_value.cc	(working copy)
@@ -6,6 +6,7 @@
 # include <cpptl/conststring.h>
 #endif
 #include <stddef.h>    // size_t
+#include <string.h>
 #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
 # include "third_party/jsoncpp/json_batchallocator.h"
 #endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
Index: third_party/skia/src/core/SkDebug_stdio.cpp
===================================================================
--- third_party/skia/src/core/SkDebug_stdio.cpp	(revision 3331)
+++ third_party/skia/src/core/SkDebug_stdio.cpp	(working copy)
@@ -54,7 +54,7 @@
     va_start(args, format);
     vsnprintf(buffer, kBufferSize, format, args);
     va_end(args);
-    fprintf(stderr, buffer);
+    fprintf(stderr, "%s", buffer);
 }
 
 #endif
Index: third_party/googleurl/src/url_parse.cc
===================================================================
--- third_party/googleurl/src/url_parse.cc	(revision 3331)
+++ third_party/googleurl/src/url_parse.cc	(working copy)
@@ -34,6 +34,7 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include <stdlib.h>
 #include "googleurl/src/url_parse.h"
 
 #include "base/logging.h"
