--- src/Plot3D.cc.orig	2007-09-22 22:58:48.000000000 +0400
+++ src/Plot3D.cc	2009-09-06 02:21:23.000000000 +0400
@@ -6,6 +6,11 @@
 #include <kmessagebox.h>
 #include "Plot3D.h"
 
+#ifdef __NetBSD__
+#define fmin(a,b) ((a)<(b)?(a):(b))
+#define fmax(a,b) ((a)>(b)?(a):(b))
+#endif
+
 using namespace std;
 
 //! general 3D Plot class
