X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrd_tool.h;h=7280e7448c1a9d3d7b47def89efad0810eb2ffed;hb=c47bbeca17b665a5f60a1c328be0590a148ea5e8;hp=5ba481bd1d7c6ea2508382192eb6b0a173c53ad7;hpb=0fe03275068c0e55d01a7cc2308fa12fdee569cf;p=rrdtool.git diff --git a/src/rrd_tool.h b/src/rrd_tool.h index 5ba481b..7280e74 100644 --- a/src/rrd_tool.h +++ b/src/rrd_tool.h @@ -45,6 +45,36 @@ extern "C" { #if HAVE_MATH_H # include #endif +/* Sorry: don't know autoconf as well how to check the exist of + dirent.h ans sys/stat.h +*/ + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#if HAVE_SYS_TYPES_H +# include +#endif + +#if HAVE_SYS_STAT_H +# include +#endif + + #if HAVE_UNISTD_H # include #endif