Browse Source

Fix compilation with --with-dmalloc

Fixes 1832; bugfix on 0.2.2.6-alpha
Karsten Loesing 15 years ago
parent
commit
15379a7254
3 changed files with 6 additions and 1 deletions
  1. 4 0
      changes/dmalloc-compile
  2. 1 1
      src/or/microdesc.c
  3. 1 0
      src/test/test.c

+ 4 - 0
changes/dmalloc-compile

@@ -0,0 +1,4 @@
+  o Minor bugfixes
+    - Fix compilation with --with-dmalloc set.  Bugfix on 0.2.2.6-alpha;
+      fixes bug 1832.
+

+ 1 - 1
src/or/microdesc.c

@@ -53,7 +53,7 @@ HT_PROTOTYPE(microdesc_map, microdesc_t, node,
              _microdesc_hash, _microdesc_eq);
 HT_GENERATE(microdesc_map, microdesc_t, node,
              _microdesc_hash, _microdesc_eq, 0.6,
-             _tor_malloc, _tor_realloc, _tor_free);
+             malloc, realloc, free);
 
 /** Write the body of <b>md</b> into <b>f</b>, with appropriate annotations.
  * On success, return the total number of bytes written, and set

+ 1 - 0
src/test/test.c

@@ -61,6 +61,7 @@ double fabs(double x);
 #ifdef USE_DMALLOC
 #include <dmalloc.h>
 #include <openssl/crypto.h>
+#include "main.h"
 #endif
 
 /** Set to true if any unit test has failed.  Mostly, this is set by the macros