--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 
 #include <vector>
+#include <algorithm>
 
 #include "Platform.h"