From d79af12e04e182bab639e64e9cd1181d5c799582 Mon Sep 17 00:00:00 2001
From: Roxie Linden <roxie@lindenlab.com>
Date: Tue, 2 Mar 2010 13:42:17 -0800
Subject: [PATCH] Fix windows build break, segfault on exit and bad library
 link location

---
 indra/cmake/LLCommon.cmake           | 6 +++++-
 indra/cmake/Linking.cmake            | 1 -
 indra/newview/llappearancemgr.cpp    | 2 +-
 indra/newview/llsechandler_basic.cpp | 2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index d1ab264a41..c10fa63049 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -13,7 +13,11 @@ set(LLCOMMON_INCLUDE_DIRS
     ${Boost_INCLUDE_DIRS}
     )
 
-set(LLCOMMON_LIBRARIES llcommon)
+if (WINDOWS)
+   set(LLCOMMON_LIBRARIES llcommon iphlpapi)
+else (WINDOWS)
+   set(LLCOMMON_LIBRARIES llcommon)
+endif (WINDOWS)
 
 add_definitions(${TCMALLOC_FLAG})
 
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index fca0cdd2d2..bca99caf2a 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -48,7 +48,6 @@ if (WINDOWS)
       wldap32
       gdi32
       user32
-      iphlpapi
       dbghelp
       )
 else (WINDOWS)
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 71df064236..c03cd5810b 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -310,7 +310,7 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
 {
 	llinfos << "done update appearance on destroy" << llendl;
 	
-	if (!LLApp::isExiting())
+	if (!LLApp::isExiting() && !LLApp::isStopped())
 	{
 		LLAppearanceManager::instance().updateAppearanceFromCOF();
 	}
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index d41ec96ab6..51e250ffc6 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -387,7 +387,7 @@ std::string cert_string_from_octet_string(ASN1_OCTET_STRING* value)
 	
 	std::stringstream result;
 	result << std::hex << std::setprecision(2);
-	for (unsigned int i=0; i < value->length; i++)
+	for (int i=0; i < value->length; i++)
 	{
 		if (i != 0) 
 		{
-- 
GitLab