From: tfheen Date: Mon, 24 Nov 2008 19:08:36 +0000 (+0000) Subject: Include relevant bit of ansidecl.h directly X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5cf80220587c11e12bd1b765c98fc3a311e91a9;p=varnish Include relevant bit of ansidecl.h directly Avoids build-dependency on binutils-dev git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3430 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libjemalloc/jemalloc_linux.c b/varnish-cache/lib/libjemalloc/jemalloc_linux.c index a0b15bb9..7eb7ef8f 100644 --- a/varnish-cache/lib/libjemalloc/jemalloc_linux.c +++ b/varnish-cache/lib/libjemalloc/jemalloc_linux.c @@ -197,10 +197,20 @@ #include #include #include -#include #include "rb.h" +/* Prevent -Werror to complain about unused parameters when compiling + with non-ancient GCC. Added directly here instead of grabbed from + ansidecl.h to save a build dependency on binutils-dev */ +#if __GNUC__ >= 3 +#ifndef ATTRIBUTE_UNUSED +#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif /* ATTRIBUTE_UNUSED */ +#else +#define ATTRIBUTE_UNUSED +#endif + #ifdef MALLOC_DEBUG /* Disable inlining to make debugging easier. */ # define inline