diff --git a/Machines/Amiga/MouseJoystick.cpp b/Machines/Amiga/MouseJoystick.cpp
index b7e1519a2..7659fc7a7 100644
--- a/Machines/Amiga/MouseJoystick.cpp
+++ b/Machines/Amiga/MouseJoystick.cpp
@@ -8,6 +8,8 @@
 
 #include "MouseJoystick.hpp"
 
+#include <algorithm>
+
 using namespace Amiga;
 
 // MARK: - Mouse.