From effdadeb1fb61ec4e30705affe51c627ef1d4650 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/branches/1.3@1723 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/configure.ac | 2 +- program/src/rrd_graph.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/program/configure.ac b/program/configure.ac index a7008312..049e9d0d 100644 --- a/program/configure.ac +++ b/program/configure.ac @@ -160,7 +160,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/program/src/rrd_graph.h b/program/src/rrd_graph.h index a42b20b6..1cab51e2 100644 --- a/program/src/rrd_graph.h +++ b/program/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.30.2