diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 2b582c90f00d2edb59e4647aa702398f122d2cfd..628982973c2525e813f408a5313517b6d9f96057 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -38,7 +38,6 @@
 #include "llagentlistener.h"
 #include "llagentwearables.h"
 #include "llagentui.h"
-
 #include "llanimationstates.h"
 #include "llbottomtray.h"
 #include "llcallingcard.h"
@@ -65,6 +64,7 @@
 #include "llsky.h"
 #include "llsmoothstep.h"
 #include "llstatusbar.h"
+#include "llteleportflags.h"
 #include "lltool.h"
 #include "lltoolmgr.h"
 #include "lltrans.h"
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 33fd3e3bf126bf23eaa3d59cccc16207898445b4..fc9654e9adbe3999f5ec1ef8510ac9c1e464f5d5 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -39,6 +39,8 @@
 #include "lltrans.h"
 #include "llviewercontrol.h"
 
+#include "llinstantmessage.h"
+
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/regex.hpp>
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index da8928321aba50b3daa5cc9e06040f6372a48496..c5f2ab9f460d1602a466906c70514f4795427b82 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -39,6 +39,7 @@
 //#include "llnotificationsutil.h"
 #include "llchannelmanager.h"
 #include "llchat.h"
+#include "llinstantmessage.h"
 #include "llnotificationptr.h"
 
 namespace LLNotificationsUI
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 6241869e184efe9e7bf4c1a750c357f537809747..19fa1dcc37bec737cffa9e66dd3754ebf129c0df 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -33,8 +33,9 @@
 #ifndef LL_LLPREVIEWGESTURE_H
 #define LL_LLPREVIEWGESTURE_H
 
-#include "llpreview.h"
+#include "llassettype.h"
 #include "llmultigesture.h"
+#include "llpreview.h"
 
 class LLMultiGesture;
 class LLLineEditor;
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 28a409d3ee8063a9ca7cf3401cca628358cc4df3..9d194c5557eb0db56bd37398244dac369a90c164 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -51,6 +51,7 @@ struct 	LLEntryAndEdCore;
 class LLMenuBarGL;
 class LLFloaterScriptSearch;
 class LLKeywordToken;
+class LLVFS;
 class LLViewerInventoryItem;
 
 // Inner, implementation class.  LLPreviewScript and LLLiveLSLEditor each own one of these.