diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 7a545843c0615e242f7d59ad3e6ac82d5ac7472f..91cb65b815a8cab24a123a91f9e2c827207ebef4 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -273,7 +273,7 @@ LLOSInfo::LLOSInfo() :
 	{
 		const char * DARWIN_PRODUCT_NAME = "Mac OS X";
 		
-		S32 major_version, minor_version, bugfix_version = 0;
+		int64_t major_version, minor_version, bugfix_version = 0;
 
 		if (LLGetDarwinOSInfo(major_version, minor_version, bugfix_version))
 		{
diff --git a/indra/llcommon/llsys_objc.h b/indra/llcommon/llsys_objc.h
index 35599a574b7212c9eb00e3be9522283a0a760973..aebc600032fb20b334d5b3604a989ec6d22914ef 100644
--- a/indra/llcommon/llsys_objc.h
+++ b/indra/llcommon/llsys_objc.h
@@ -27,7 +27,9 @@
 #ifndef LL_LLSYS_OBJC_H
 #define LL_LLSYS_OBJC_H
 
-bool LLGetDarwinOSInfo(int &major, int &minor, int &patch);
+#include <cstdint>
+
+bool LLGetDarwinOSInfo(int64_t &major, int64_t &minor, int64_t &patch);
 
 
 #endif // LL_LLSYS_OBJC_H
diff --git a/indra/llcommon/llsys_objc.mm b/indra/llcommon/llsys_objc.mm
index 81032658d73f972735d90753358b3d8b5496053a..3fd85fb1c9c61e0665c67cda9f9ca610aeab5b44 100644
--- a/indra/llcommon/llsys_objc.mm
+++ b/indra/llcommon/llsys_objc.mm
@@ -27,19 +27,19 @@
 #import "llsys_objc.h"
 #import <AppKit/AppKit.h>
 
-static int intAtStringIndex(NSArray *array, int index)
+static auto intAtStringIndex(NSArray *array, int index)
 {
-    return int([(NSString *)[array objectAtIndex:index] integerValue]);
+    return [(NSString *)[array objectAtIndex:index] integerValue];
 }
 
-bool LLGetDarwinOSInfo(int &major, int &minor, int &patch)
+bool LLGetDarwinOSInfo(int64_t &major, int64_t &minor, int64_t &patch)
 {
     if (NSAppKitVersionNumber > NSAppKitVersionNumber10_8)
     {
         NSOperatingSystemVersion osVersion = [[NSProcessInfo processInfo] operatingSystemVersion];
-        major = int(osVersion.majorVersion);
-        minor = int(osVersion.minorVersion);
-        patch = int(osVersion.patchVersion);
+        major = osVersion.majorVersion;
+        minor = osVersion.minorVersion;
+        patch = osVersion.patchVersion;
     }
     else
     {
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index cabc3a3517b015ed0812e2af82a090fdc3cf8975..67da311493767439a432fbfdcf98c068149874bf 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -864,7 +864,7 @@ size_t LLTextureCache::update(F32 max_time_ms)
 	static LLFrameTimer timer ;
 	static const F32 MAX_TIME_INTERVAL = 300.f ; //seconds.
 
-	S32 res;
+	size_t res;
 	res = LLWorkerThread::update(max_time_ms);
 
 	mListMutex.lock();
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index e6437ef5eac43acd7e0f52125befca67f8761dc9..b6ace467c781c6d83d47caf2b527a56b047331f0 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -113,7 +113,7 @@ class LLTextureCache : public LLWorkerThread
 	LLTextureCache(bool threaded);
 	~LLTextureCache();
 
-	/*virtual*/ size_t update(F32 max_time_ms);	
+	/*virtual*/ size_t update(F32 max_time_ms);
 	
 	void purgeCache(ELLPath location, bool remove_dir = true);
 	void setReadOnly(BOOL read_only) ;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 8cd6ccba856fe40c81268552ce160a152b6a0c56..8923f53cf5efc4a7d1273d9c2ea32cd30edcf4f3 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -3195,7 +3195,7 @@ size_t LLTextureFetch::update(F32 max_time_ms)
 		mNetworkQueueMutex.unlock();									// -Mfnq
 	}
 
-	S32 res = LLWorkerThread::update(max_time_ms);
+	size_t res = LLWorkerThread::update(max_time_ms);
 	
 	if (!mDebugPause)
 	{