diff --git a/src/settings.cpp b/src/settings.cpp
index 34348cc06fde032ff6e0e8ef2d710321b1e15896..6631ceb6e7bf1a2c87fcfb5a55af6301a21b4a59 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "util/serialize.h"
 #include "filesys.h"
 #include <cctype>
+#include <algorithm>
 
 
 Settings::~Settings()