--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -48,6 +48,7 @@
 #include <signal.h>
 #include <math.h>
 #include <limits.h>
+#include <algorithm>
 #include "goo/GooString.h"
 #include "goo/GooList.h"
 #include "goo/GooHash.h"
