--- src/Plot2D.cc.orig	2007-11-22 01:21:39.000000000 +0300
+++ src/Plot2D.cc	2009-09-06 02:19:15.000000000 +0400
@@ -10,6 +10,11 @@
 #include "Plot2DSurface.h"
 #include "defs.h"
 
+#ifdef __NetBSD__
+#define fmin(a,b) ((a)<(b)?(a):(b))
+#define fmax(a,b) ((a)>(b)?(a):(b))
+#endif
+
 using namespace std;
 
 // general 2D Plot class
