summaryrefslogtreecommitdiff
path: root/utils
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
parent5e0dbdb9e5acdcf7dea29335a5db065f48c58766 (diff)
ldd.host: Fix compilation for STANDALONE support
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile.in12
-rw-r--r--utils/porting.h4
2 files changed, 10 insertions, 6 deletions
diff --git a/utils/Makefile.in b/utils/Makefile.in
index cca2c585a..bb85be3ce 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -52,24 +52,24 @@ UTILS_CONFIG_FLAGS-$(LDSO_STANDALONE_SUPPORT) += -D__LDSO_STANDALONE_SUPPORT__
BUILD_CFLAGS-utils := \
-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
+ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
$(UTILS_CONFIG_FLAGS-y)
-BUILD_CFLAGS-ldconfig.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-ldconfig.host := \
-DBUILDING_LINKAGE \
-I$(top_srcdir)ldso/include
-BUILD_CFLAGS-ldd.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-ldd.host := \
-DBUILDING_LINKAGE \
-I$(top_srcdir)ldso/include \
-include $(top_srcdir)include/elf.h
-BUILD_CFLAGS-locale.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-locale.host := \
-DNOT_IN_libc \
-I$(top_srcdir)utils/ \
-I.
-BUILD_CFLAGS-iconv.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-iconv.host := \
-include $(top_builddir)extra/locale/c8tables.h \
-I$(top_srcdir)libc/misc/wchar -DL_iconv_main
-BUILD_CFLAGS-getconf.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-getconf.host := \
-DGETCONF_DIR='"$(CURDIR)"'
# Rules
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