chiark / gitweb /
mount-setup: create full paths when mounting
[elogind.git] / macro.h
diff --git a/macro.h b/macro.h
index 76ae465b90f2754a7b001be9617a9a8e7386ee76..2eaa3d6fbbdadbf5075a99d825423a815ff08e6a 100644 (file)
--- 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