From 4b5ac7a480b29d680d4ac325ca7b394559505164 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@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 0d39a7b4..6cc2767e 100644 --- a/program/configure.ac +++ b/program/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/program/src/rrd_graph.h b/program/src/rrd_graph.h index 3f9a3f19..25e9db22 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