summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/src
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2017-01-20 21:16:55 +0000
committeriphydf <iphydf@users.noreply.github.com>2017-01-28 20:49:12 +0000
commit6ae33c16cf9e37fda85d70c78b3c2779eb8ca21a (patch)
tree99c3a8c26e02039b515bb6f57d2797d1cdf77c1d /other/bootstrap_daemon/src
parent895de7ef26e7617769f2271345e414545c2581f8 (diff)
Add VLA compatibility macro for C89-ish compilers.
Diffstat (limited to 'other/bootstrap_daemon/src')
-rw-r--r--other/bootstrap_daemon/src/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/other/bootstrap_daemon/src/log.c b/other/bootstrap_daemon/src/log.c
index 7431838c..a0517528 100644
--- a/other/bootstrap_daemon/src/log.c
+++ b/other/bootstrap_daemon/src/log.c
@@ -26,6 +26,8 @@
26 26
27#include "global.h" 27#include "global.h"
28 28
29#include "../../../toxcore/ccompat.h"
30
29#include <assert.h> 31#include <assert.h>
30#include <syslog.h> 32#include <syslog.h>
31#include <stdarg.h> 33#include <stdarg.h>
@@ -94,7 +96,7 @@ static void log_syslog(LOG_LEVEL level, const char *format, va_list args)
94 return; 96 return;
95 } 97 }
96 98
97 char buf[size + 1]; 99 VLA(char, buf, size + 1);
98 vsnprintf(buf, size + 1, format, args); 100 vsnprintf(buf, size + 1, format, args);
99 101
100 syslog(level_syslog(level), "%s", buf); 102 syslog(level_syslog(level), "%s", buf);