summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--macro.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/macro.h b/macro.h
index 2379ee2de3..622c08eeda 100644
--- a/macro.h
+++ b/macro.h
@@ -117,10 +117,12 @@ static inline size_t ALIGN(size_t l) {
#define char_array_0(x) x[sizeof(x)-1] = 0;
-#define IOVEC_SET_STRING(iovec, s) \
+#define IOVEC_SET_STRING(i, s) \
do { \
- (iovec).iov_base = s; \
- (iovec).iov_len = strlen(s); \
+ struct iovec *_i = &(i); \
+ char *_s = (char *)(s); \
+ _i->iov_base = _s; \
+ _i->iov_len = strlen(_s); \
} while(false);
#include "log.h"