cgraph contains an empty malloc.h, that seems to be needed by files that are generated by yacc. This empty malloc.h is however also picked in other places (first error is from plugin/visio/VisioGraphic.cpp). By moving the empty malloc.h to include/ and only letting cgraph having `-Iinclude` we can make sure it is only picked up where it should be picked up. Compiling on device works without this patch, but it gives warnings like ``` ../../../lib/common/memory.c:47:10: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration] ``` diff --git a/lib/cgraph/Makefile.am b/lib/cgraph/Makefile.am index bb6147b91..419940a7c 100644 --- a/lib/cgraph/Makefile.am +++ b/lib/cgraph/Makefile.am @@ -8,10 +8,11 @@ pkgconfigdir = $(libdir)/pkgconfig AM_CPPFLAGS = \ -I$(top_srcdir) \ - -I$(top_srcdir)/lib/cdt + -I$(top_srcdir)/lib/cdt \ + -Iinclude pkginclude_HEADERS = cgraph.h -noinst_HEADERS = agxbuf.h cghdr.h malloc.h +noinst_HEADERS = agxbuf.h cghdr.h include/malloc.h noinst_LTLIBRARIES = libcgraph_C.la lib_LTLIBRARIES = libcgraph.la pkgconfig_DATA = libcgraph.pc diff --git a/lib/cgraph/malloc.h b/lib/cgraph/include/malloc.h similarity index 100% rename from lib/cgraph/malloc.h rename to lib/cgraph/include/malloc.h