On Fri, Apr 05, 2013 at 11:46:44AM +0200, Bernhard Reutner-Fischer wrote: > > >> --- a/libsanitizer/sanitizer_common/sanitizer_allocator.cc > > >> +++ b/libsanitizer/sanitizer_common/sanitizer_allocator.cc > > >> @@ -9,11 +9,13 @@ > > >> // run-time libraries. > > >> // This allocator that is used inside run-times. > > >> > > >> //===----------------------------------------------------------------------===// > > >> + > > >> +#include <features.h> > > > > I overlooked this. > > The sanitizer files (other than *_linux.cc and such) may not include > > *any* system header files. > > We've been there, it cost us lots of pain and lots of work to get rid of. > > > So how do you suggest i should deal with it then? > I do not have a CPP token inside of the compiler to denote the libc > type, AFAICS.
autoconf, and pass some -DHAS___LIBC_MALLOC or similar down to the compiler (or just -DUCLIBC or whatever, -DUCLIBC would have the advantage that (provided llvm doesn't support uClibc) that you'd only need to change gcc's configury)? Jakub