summaryrefslogtreecommitdiff
path: root/common/stringx.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/stringx.c')
-rw-r--r--common/stringx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/stringx.c b/common/stringx.c
index 8ae70f5..7ee85ae 100644
--- a/common/stringx.c
+++ b/common/stringx.c
@@ -62,6 +62,7 @@ static void vmessage(clamsmtp_context_t* ctx, int level, int err,
size_t len;
char* m;
int e = errno;
+ int x;
if(g_daemonized)
{
@@ -87,7 +88,11 @@ static void vmessage(clamsmtp_context_t* ctx, int level, int err,
snprintf(m, len, "%s%s", msg, err ? ": " : "");
if(err)
- strerror_r(e, m + strlen(m), MAX_MSGLEN);
+ {
+ /* TODO: strerror_r doesn't want to work for us
+ strerror(e, m + strlen(m), MAX_MSGLEN); */
+ strncat(m, strerror(e), len);
+ }
m[len - 1] = 0;
msg = m;