[collectd] email plugin patch
Oleg King
king2 at kaluga.ru
Mon Jun 16 20:48:37 CEST 2008
Hello!
I found several places in plugin that do not allow to compile plugin
on FreeBSD 6.2.
Patch follows:
diff -pur collectd.orig/src/email.c collectd/src/email.c
--- collectd.orig/src/email.c 2008-06-16 22:42:59.000000000 +0400
+++ collectd/src/email.c 2008-06-16 22:44:07.000000000 +0400
@@ -284,7 +284,7 @@ static void *collect (void *arg)
if (0 != errno) {
char errbuf[1024];
log_err ("[thread #%5lu] reading from socket (fd #%i) "
- "failed: %s", self, fileno (this->socket),
+ "failed: %s", (unsigned long) self, fileno (this->socket),
sstrerror (errno, errbuf, sizeof (errbuf)));
}
break;
@@ -304,11 +304,11 @@ static void *collect (void *arg)
line[len - 1] = '\0';
- log_debug ("[thread #%5lu] line = '%s'", self, line);
+ log_debug ("[thread #%5lu] line = '%s'", (unsigned long) self, line);
if (':' != line[1]) {
log_err ("[thread #%5lu] syntax error in line '%s'",
- self, line);
+ (unsigned long) self, line);
continue;
}
@@ -320,7 +320,7 @@ static void *collect (void *arg)
if (NULL == tmp) {
log_err ("[thread #%5lu] syntax error in line '%s'",
- self, line);
+ (unsigned long) self, line);
continue;
}
@@ -354,7 +354,7 @@ static void *collect (void *arg)
} while (NULL != (type = strtok_r (NULL, ",", &ptr)));
}
else {
- log_err ("[thread #%5lu] unknown type '%c'", self, line[0]);
+ log_err ("[thread #%5lu] unknown type '%c'", (unsigned long) self, line[0]);
}
} /* while (loop) */
--
WBR,
Oleg mailto:king2 at kaluga.ru
More information about the collectd
mailing list