#include <sys/capability.h>
#endif
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
#ifdef HAVE_LIBKSTAT
extern kstat_ctl_t *kc;
#endif
if (EEXIST == errno)
continue;
- char errbuf[1024];
- ERROR("check_create_dir: mkdir (%s): %s", dir,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("check_create_dir: mkdir (%s): %s", dir, STRERRNO);
return -1;
} else {
- char errbuf[1024];
- ERROR("check_create_dir: stat (%s): %s", dir,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("check_create_dir: stat (%s): %s", dir, STRERRNO);
return -1;
}
} else if (!S_ISDIR(statbuf.st_mode)) {
int format_values(char *ret, size_t ret_len, /* {{{ */
const data_set_t *ds, const value_list_t *vl,
- _Bool store_rates) {
+ bool store_rates) {
size_t offset = 0;
int status;
gauge_t *rates = NULL;
failure = 0;
if ((dh = opendir(dir)) == NULL) {
- char errbuf[1024];
- ERROR("walk_directory: Cannot open '%s': %s", dir,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("walk_directory: Cannot open '%s': %s", dir, STRERRNO);
return -1;
}