blueness    14/04/27 15:01:03

  Added:                tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch
  Log:
  Version bump
  
  (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 
0xF52D4BBA)

Revision  Changes    Path
1.1                  
net-misc/tor/files/tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tor/files/tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tor/files/tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch?rev=1.1&content-type=text/plain

Index: tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch
===================================================================
>From a7401d1fb67027cab223d894a6af160ffa7e54c7 Mon Sep 17 00:00:00 2001
From: "Anthony G. Basile" <[email protected]>
Date: Sun, 27 Apr 2014 10:34:15 -0400
Subject: [PATCH] src/or/buffers.c: fix build when --disable-buf-freelists

When tor is configured with --disable-buf-freelists, and RUNNING_DOXYGEN
is not defined, buffers.c fails to compile because 
total_bytes_allocated_in_chunks
is defined in src/or/buffers.c within an #if ... #else block and yet used
in both the #if ... #else and #else .. #endif block.  By moving its declaration
before the #if ... #else ... #endif, we expand its visibility to both blocks
where it is used.
---
 src/or/buffers.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/or/buffers.c b/src/or/buffers.c
index fb18608..eec94ff 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -117,6 +117,9 @@ chunk_repack(chunk_t *chunk)
   chunk->data = &chunk->mem[0];
 }
 
+/** DOCDOC */
+static size_t total_bytes_allocated_in_chunks = 0;
+
 #if defined(ENABLE_BUF_FREELISTS) || defined(RUNNING_DOXYGEN)
 /** A freelist of chunks. */
 typedef struct chunk_freelist_t {
@@ -148,9 +151,6 @@ static chunk_freelist_t freelists[] = {
  * could help with? */
 static uint64_t n_freelist_miss = 0;
 
-/** DOCDOC */
-static size_t total_bytes_allocated_in_chunks = 0;
-
 static void assert_freelist_ok(chunk_freelist_t *fl);
 
 /** Return the freelist to hold chunks of size <b>alloc</b>, or NULL if
-- 
1.8.3.2





Reply via email to