X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fcommon.h;fp=src%2Fdaemon%2Fcommon.h;h=cf4c5a71b9ac484a52be4cb2b6975434afd6922e;hb=a6a884d250900f2d7abcd1523aa4d97db520b9c2;hp=7f8605215b7f5de425721bba2e8a482b352ee5ce;hpb=531bad35502b9543074e31e0c80a9f7a6f3a8b27;p=collectd.git diff --git a/src/daemon/common.h b/src/daemon/common.h index 7f860521..cf4c5a71 100644 --- a/src/daemon/common.h +++ b/src/daemon/common.h @@ -73,6 +73,13 @@ char *sstrdup(const char *s); void *smalloc(size_t size); char *sstrerror(int errnum, char *buf, size_t buflen); +#ifndef ERRBUF_SIZE +#define ERRBUF_SIZE 256 +#endif + +#define STRERROR(e) sstrerror((e), (char[ERRBUF_SIZE]){0}, ERRBUF_SIZE) +#define STRERRNO STRERROR(errno) + /* * NAME * sread