[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] build: fix build without MALLOC_STATS

From: Eric Blake
Subject: [PATCH] build: fix build without MALLOC_STATS
Date: Fri, 17 Apr 2015 08:47:22 -0600

gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde 
-L./lib/malloc -L./lib/sh  -rdynamic  -g -O2 -Wno-parentheses 
-Wno-format-security -o bash shell.o eval.o y.tab.o general.o make_cmd.o 
print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o 
flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o 
unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o 
assoc.o braces.o bracecomp.o bashhist.o bashline.o  list.o stringlib.o locale.o 
findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o  -lbuiltins -lglob 
-lsh -lreadline -lhistory -ltermcap -ltilde -lmalloc    -ldl
shell.o: In function `sh_exit':
/home/eblake/bash/shell.c:968: undefined reference to `trace_malloc_stats'

* shell.c (sh_exit): Require MALLOC_STATS, not just MALLOC_DEBUG.

Signed-off-by: Eric Blake <address@hidden>

Another fix that I need to get the devel branch of bash.git to compile
(I'm not sure what logic you intended for MALLOC_DEBUG vs.
MALLOC_STATS, nor if one should imply the other, so I'm okay if your
patch is different than my temporary workaround).

 shell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell.c b/shell.c
index c0107ff..9f9593b 100644
--- a/shell.c
+++ b/shell.c
@@ -963,7 +963,7 @@ void
 sh_exit (s)
      int s;
-#if defined (MALLOC_DEBUG) && defined (USING_BASH_MALLOC)
+#if defined (MALLOC_STATS) && defined (USING_BASH_MALLOC)
   if (malloc_trace_at_exit)
     trace_malloc_stats (get_name_for_error (), (char *)NULL);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]