summaryrefslogtreecommitdiff
path: root/macro.h
diff options
context:
space:
mode:
Diffstat (limited to 'macro.h')
-rw-r--r--macro.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/macro.h b/macro.h
index 76ae465b90..2eaa3d6fbb 100644
--- a/macro.h
+++ b/macro.h
@@ -97,4 +97,10 @@ static inline size_t ALIGN(size_t l) {
#define char_array_0(x) x[sizeof(x)-1] = 0;
+#define IOVEC_SET_STRING(iovec, s) \
+ do { \
+ (iovec).iov_base = s; \
+ (iovec).iov_len = strlen(s); \
+ } while(false);
+
#endif