Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/tor/files: tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch
Date: Sun, 27 Apr 2014 15:01:08
Message-Id: 20140427150103.B2F2D2004C@flycatcher.gentoo.org
1 blueness 14/04/27 15:01:03
2
3 Added: tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch
4 Log:
5 Version bump
6
7 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
8
9 Revision Changes Path
10 1.1 net-misc/tor/files/tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch
11
12 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
13 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
14
15 Index: tor-0.2.5.4_alpha-fix-disable-buf-freelist.patch
16 ===================================================================
17 From a7401d1fb67027cab223d894a6af160ffa7e54c7 Mon Sep 17 00:00:00 2001
18 From: "Anthony G. Basile" <blueness@g.o>
19 Date: Sun, 27 Apr 2014 10:34:15 -0400
20 Subject: [PATCH] src/or/buffers.c: fix build when --disable-buf-freelists
21
22 When tor is configured with --disable-buf-freelists, and RUNNING_DOXYGEN
23 is not defined, buffers.c fails to compile because total_bytes_allocated_in_chunks
24 is defined in src/or/buffers.c within an #if ... #else block and yet used
25 in both the #if ... #else and #else .. #endif block. By moving its declaration
26 before the #if ... #else ... #endif, we expand its visibility to both blocks
27 where it is used.
28 ---
29 src/or/buffers.c | 6 +++---
30 1 file changed, 3 insertions(+), 3 deletions(-)
31
32 diff --git a/src/or/buffers.c b/src/or/buffers.c
33 index fb18608..eec94ff 100644
34 --- a/src/or/buffers.c
35 +++ b/src/or/buffers.c
36 @@ -117,6 +117,9 @@ chunk_repack(chunk_t *chunk)
37 chunk->data = &chunk->mem[0];
38 }
39
40 +/** DOCDOC */
41 +static size_t total_bytes_allocated_in_chunks = 0;
42 +
43 #if defined(ENABLE_BUF_FREELISTS) || defined(RUNNING_DOXYGEN)
44 /** A freelist of chunks. */
45 typedef struct chunk_freelist_t {
46 @@ -148,9 +151,6 @@ static chunk_freelist_t freelists[] = {
47 * could help with? */
48 static uint64_t n_freelist_miss = 0;
49
50 -/** DOCDOC */
51 -static size_t total_bytes_allocated_in_chunks = 0;
52 -
53 static void assert_freelist_ok(chunk_freelist_t *fl);
54
55 /** Return the freelist to hold chunks of size <b>alloc</b>, or NULL if
56 --
57 1.8.3.2