summaryrefslogtreecommitdiff
path: root/utils/porting.h
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-05-08 21:22:51 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-05-08 21:22:51 +0200
commit8579ca1921f038d7e7c1e100709e0a35cf9d1a7d (patch)
treed9cbbb5db39ed927a1f98d22d99682e02a3d1cdd /utils/porting.h
parent5e0dbdb9e5acdcf7dea29335a5db065f48c58766 (diff)
ldd.host: Fix compilation for STANDALONE support
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'utils/porting.h')
-rw-r--r--utils/porting.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/porting.h b/utils/porting.h
index d4ead17d4..f1fdc70aa 100644
--- a/utils/porting.h
+++ b/utils/porting.h
@@ -45,6 +45,10 @@
#include <dmalloc.h>
#endif
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#endif
+
/* For SunOS */
#ifndef PATH_MAX
#define PATH_MAX _POSIX_PATH_MAX