From 092fd67668e340423f7621c9e5b3d2a84fffe280 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 2 Feb 2009 19:50:51 +1300 Subject: [PATCH] Fix link error on ufsdump It appears that libmiscutil MUST be linked after all used local .la libs or it's symbols may get dropped. --- include/heap.h | 4 ++-- lib/heap.c | 1 - src/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/heap.h b/include/heap.h index f1e4a3f52b..c171af841c 100644 --- a/include/heap.h +++ b/include/heap.h @@ -51,7 +51,7 @@ * the current aging factor for the heap. */ typedef unsigned long heap_mutex_t; -typedef void *heap_t; +typedef void * heap_t; typedef double heap_key; typedef heap_key heap_key_func(heap_t, heap_key); @@ -103,7 +103,7 @@ SQUIDCEXTERN void delete_heap(heap *); * should be done with this data structure (especially modifying it!) The * heap does not assume ownership of the data passed to it. */ -SQUIDCEXTERN heap_node *heap_insert(heap *, heap_t dat); +SQUIDCEXTERN heap_node *heap_insert(heap *hp, heap_t dat); /* * Delete a node out of a heap. Returns the heap data from the deleted diff --git a/lib/heap.c b/lib/heap.c index 9daefcf213..8900ee0d22 100644 --- a/lib/heap.c +++ b/lib/heap.c @@ -53,7 +53,6 @@ #include #endif -#include "heap.h" #include "util.h" /* diff --git a/src/Makefile.am b/src/Makefile.am index 9a33acbad5..66aa0eb3f0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -887,7 +887,6 @@ ufsdump_SOURCES = \ ufsdump_LDADD = \ libsquid.la \ libauth.la \ - -L../lib -lmiscutil \ @XTRA_OBJS@ \ @REPL_OBJS@ \ @STORE_OBJS@ \ @@ -897,6 +896,7 @@ ufsdump_LDADD = \ @SNMPLIB@ \ @ICAP_LIBS@ \ @SSLLIB@ \ + -L$(top_builddir)/lib -lmiscutil \ @XTRA_LIBS@ \ @EPOLL_LIBS@ \ @MINGW_LIBS@ -- 2.47.2