From: octo Date: Fri, 14 Apr 2006 15:27:31 +0000 (+0000) Subject: Fixing compile-errors/-warnings when building without librrd. X-Git-Tag: collectd-3.8.6^2~40 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fea7eeb543d7bbdb4bbc95dffc9f69154da6f15d;p=collectd.git Fixing compile-errors/-warnings when building without librrd. --- diff --git a/src/common.c b/src/common.c index 7690d019..58db4d8a 100644 --- a/src/common.c +++ b/src/common.c @@ -363,7 +363,8 @@ static int check_create_dir (const char *file_orig) /* * * * * * Magic * * * * * */ -int rra_get (char ***ret) +#if HAVE_LIBRRD +static int rra_get (char ***ret) { static char **rra_def = NULL; static int rra_num = 0; @@ -440,12 +441,16 @@ int rra_get (char ***ret) *ret = rra_def; return (rra_num); } +#endif /* HAVE_LIBRRD */ static int log_create_file (char *filename, char **ds_def, int ds_num) { FILE *log; int i; + if (check_create_dir (filename)) + return (-1); + log = fopen (filename, "w"); if (log == NULL) {