From 8106f1070a0affaa20c495fc9c38f192b199e8b7 Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 26 Dec 2008 08:05:03 +0000 Subject: [PATCH] Include libgen.h to get prototype for basename in a POSIX conformant way. Fix for #202. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1723 a5681a0c-68f1-0310-ab6d-d61299d08faa --- configure.ac | 2 +- src/rrd_graph.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0d39a7b..6cc2767 100644 --- a/configure.ac +++ b/configure.ac @@ -176,7 +176,7 @@ CONFIGURE_PART(Checking for Header Files) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_DIRENT -AC_CHECK_HEADERS(features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h) +AC_CHECK_HEADERS(libgen.h features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/src/rrd_graph.h b/src/rrd_graph.h index 3f9a3f1..25e9db2 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -11,6 +11,11 @@ #include #include +#ifdef HAVE_LIBGEN_H +/* for basename */ +# include +#endif + #include "rrd_tool.h" #include "rrd_rpncalc.h" -- 2.11.0