--- src/PlotTernary.cc.orig	2007-09-22 22:59:49.000000000 +0400
+++ src/PlotTernary.cc	2009-09-06 03:47:39.000000000 +0400
@@ -5,6 +5,11 @@
 #include <kdebug.h>
 #include "PlotTernary.h"
 
+#ifdef __NetBSD__
+#define fmin(a,b) ((a)<(b)?(a):(b))
+#define fmax(a,b) ((a)>(b)?(a):(b))
+#endif
+
 using namespace std;
 
 //! general ternary Plot class
