Code

Only include libgen.h when we have it. use pbbasename if we do not. Also fixes #223.
[rrdtool.git] / src / rrd_graph.c
index a0de36e43672c46c992dfc81a25ea7efad740d7f..594c9f6df525375f6dda0d5deea4d780c21172c2 100644 (file)
@@ -6,11 +6,16 @@
 
 
 #include <sys/stat.h>
-#include <libgen.h>
+
+/* for basename */
+#ifdef HAVE_LIBGEN_H
+#  include <libgen.h>
+#eles
+#include "plbasename.h"
+#endif
 
 #ifdef WIN32
 #include "strftime.h"
-#include "plbasename.h"
 #endif
 
 #include "rrd_tool.h"