aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/xenstore/utils.h')
-rw-r--r--tools/xenstore/utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/xenstore/utils.h b/tools/xenstore/utils.h
index f378343707..2effd17b61 100644
--- a/tools/xenstore/utils.h
+++ b/tools/xenstore/utils.h
@@ -19,7 +19,9 @@ static inline bool strends(const char *a, const char *b)
return streq(a + strlen(a) - strlen(b), b);
}
+#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#endif
void barf(const char *fmt, ...) __attribute__((noreturn));
void barf_perror(const char *fmt, ...) __attribute__((noreturn));