$NetBSD: patch-aq,v 1.4 2010/07/17 19:29:25 tron Exp $

--- poppler/TextOutputDev.cc.orig	2010-06-08 20:06:31.000000000 +0000
+++ poppler/TextOutputDev.cc
@@ -63,6 +63,14 @@
 #include "ICSupport.h"
 #endif
 
+#if defined(__DragonFly__) || defined(__NetBSD__)
+#include <sys/param.h>
+#if !(defined(__DragonFly__) && __DragonFly_version >= 200204) && !(defined(__NetBSD__) && (__NetBSD_Version__ >= 599002100 || (__NetBSD_Version__ >= 501000000 && __NetBSD_Version__ < 599000000)))
+static double fmax(double x, double y) { if (isnan(x)) return y; if (isnan(y)) return x; return (x > y ? x : y);}
+static double fmin(double x, double y) { if (isnan(x)) return y; if (isnan(y)) return x; return (x < y ? x : y);}
+#endif
+#endif
+
 //------------------------------------------------------------------------
 // parameters
 //------------------------------------------------------------------------
