diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp
index 8551858d1a514107bc1684026f015e64ebd3b909..18ec4d2ed58d45ee2eb15fb525f57816df68e707 100644
--- a/src/core/frontend/framebuffer_layout.cpp
+++ b/src/core/frontend/framebuffer_layout.cpp
@@ -2,6 +2,8 @@
 // Licensed under GPLv2 or any later version
 // Refer to the license.txt file included.
 
+#include <cmath>
+
 #include "common/assert.h"
 #include "core/frontend/framebuffer_layout.h"
 
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h
index 8c26285e564c12da1018aec8e66fb312f38b7784..42941d1515cfaff5e47393802cf38bb800a6c0b1 100644
--- a/src/core/hle/kernel/hle_ipc.h
+++ b/src/core/hle/kernel/hle_ipc.h
@@ -154,13 +154,13 @@ public:
     template<typename T>
     SharedPtr<T> GetCopyObject(size_t index) {
         ASSERT(index < copy_objects.size());
-        return DynamicObjectCast(copy_objects[index]);
+        return DynamicObjectCast<T>(copy_objects[index]);
     }
 
     template<typename T>
     SharedPtr<T> GetMoveObject(size_t index) {
         ASSERT(index < move_objects.size());
-        return DynamicObjectCast(move_objects[index]);
+        return DynamicObjectCast<T>(move_objects[index]);
     }
 
     void AddMoveObject(SharedPtr<Object> object) {