r3430 - trunk/varnish-cache/lib/libjemalloc

tfheen at projects.linpro.no tfheen at projects.linpro.no
Mon Nov 24 20:08:36 CET 2008


Author: tfheen
Date: 2008-11-24 20:08:36 +0100 (Mon, 24 Nov 2008)
New Revision: 3430

Modified:
   trunk/varnish-cache/lib/libjemalloc/jemalloc_linux.c
Log:
Include relevant bit of ansidecl.h directly

Avoids build-dependency on binutils-dev


Modified: trunk/varnish-cache/lib/libjemalloc/jemalloc_linux.c
===================================================================
--- trunk/varnish-cache/lib/libjemalloc/jemalloc_linux.c	2008-11-24 17:47:21 UTC (rev 3429)
+++ trunk/varnish-cache/lib/libjemalloc/jemalloc_linux.c	2008-11-24 19:08:36 UTC (rev 3430)
@@ -197,10 +197,20 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <pthread.h>
-#include <ansidecl.h>
 
 #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



More information about the varnish-commit mailing list