diff options
Diffstat (limited to 'src/shared/macro.h')
-rw-r--r-- | src/shared/macro.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/macro.h b/src/shared/macro.h index bfe03f2ae0..969329d152 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -186,6 +186,8 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) { #define char_array_0(x) x[sizeof(x)-1] = 0; +#define hasprefix(s, prefix) (memcmp(s, prefix, strlen(prefix)) == 0) + #define IOVEC_SET_STRING(i, s) \ do { \ struct iovec *_i = &(i); \ |