summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatish Patel <satish.patel@linaro.org>2016-04-08 19:14:54 +0530
committerSatish Patel <satish.patel@linaro.org>2016-04-08 19:14:54 +0530
commit74cca40b0fb3f190aa6fee9ed75709ec1480fb79 (patch)
treed818ddf2bc6b98e299604386ca867f2d79340222
parent64c1295f8190f2c8ef658ffe01ec191b206a5181 (diff)
downloadnedmalloc-74cca40b0fb3f190aa6fee9ed75709ec1480fb79.tar.gz
nedmalloc: Fixed build error while compiling with cpp file
As !defined macro does not work, with .cpp file as expected. Using standalone macro to define mallinfo structure This is to fix build error for compiling c++ test
-rw-r--r--nedmalloc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/nedmalloc.h b/nedmalloc.h
index 199f46a..4eb894a 100644
--- a/nedmalloc.h
+++ b/nedmalloc.h
@@ -280,6 +280,7 @@ is no comparable system on POSIX).
* Also if its usage leads to change in approach defined (to use alternate
* malloc) in malloc_common.cpp
*/
+#define MALLINFO_NOT_DECLARED 1
#ifdef ACCESS_FROM_BIONIC
/* use default name for mallinfo. Function & Structure has same name.
@@ -289,11 +290,11 @@ is no comparable system on POSIX).
/* malloc.h should not re-defined this structure again, hence defining the
* macro here, used by malloc.h
*/
-#define STRUCT_MALLINFO_DECLARED 1
+#undef MALLINFO_NOT_DECLARED
#endif //ACCESS_FROM_BIONIC
-#if !defined(STRUCT_MALLINFO_DECLARED)
+#ifdef MALLINFO_NOT_DECLARED
#if defined(__cplusplus)
extern "C" {
#endif