tags 521985 +patch
thanks

The attached patch fixes this bug and makes the clean target in debian/rules cleanup properly
diff -ur libtrace3-3.0.4/debian/rules libtrace3-3.0.4.new/debian/rules
--- libtrace3-3.0.4/debian/rules	2009-04-06 00:10:41.000000000 +0100
+++ libtrace3-3.0.4.new/debian/rules	2009-04-06 00:34:39.000000000 +0100
@@ -18,7 +18,12 @@
 	CFLAGS += -O2
 endif
 
-config.status: configure
+libtrace_backup.h:
+	#libtrace.h is modified by the build so back it up so it can be restored
+	#by the clean target
+	cp lib/libtrace.h libtrace_backup.h
+
+config.status: configure libtrace_backup.h
 	dh_testdir
 	# Add here commands to configure the package.
 	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
@@ -40,9 +45,27 @@
 
 	# Add here commands to clean up after the build process.
 	[ ! -f Makefile ] || $(MAKE) clean
+	[ ! -f libtrace_backup.h ] || mv libtrace_backup.h lib/libtrace.h
 	rm -rf docs/doxygen
 	rm -f config.status
 
+	cd libpacketdump && rm -rf .deps Makefile
+	rm -f libtool Makefile stamp-h1 config.h config.log
+	rm -f tools/makefile
+	cd tools/traceanon && rm -rf .deps Makefile
+	cd tools/traceflow && rm -rf .deps Makefile
+	cd tools/tracemerge && rm -rf .deps Makefile
+	cd tools/tracepktdump && rm -rf .deps Makefile
+	cd tools/tracereport && rm -rf .deps Makefile
+	cd tools/tracertstats && rm -rf .deps Makefile
+	cd tools/tracesplit && rm -rf .deps Makefile
+	cd tools/tracestats && rm -rf .deps Makefile
+	cd examples/rate && rm -rf .deps Makefile
+	cd examples/skeleton && rm -rf .deps Makefile
+	cd examples/stats && rm -rf .deps Makefile
+	cd lib && rm -rf .deps Makefile
+	rm -rf docs/libtrace.doxygen docs/Makefile
+	rm -rf examples/Makefile
 
 	dh_clean 
 
Only in libtrace3-3.0.4/docs: doxygen
diff -ur libtrace3-3.0.4/lib/protocols_l3.c libtrace3-3.0.4.new/lib/protocols_l3.c
--- libtrace3-3.0.4/lib/protocols_l3.c	2008-01-02 21:09:40.000000000 +0000
+++ libtrace3-3.0.4.new/lib/protocols_l3.c	2009-04-06 00:01:16.000000000 +0100
@@ -2,6 +2,7 @@
 #include "libtrace.h"
 #include "protocols.h"
 #include <assert.h>
+#include <stdlib.h>
 
 libtrace_ip_t *trace_get_ip(libtrace_packet_t *packet) 
 {
diff -ur libtrace3-3.0.4/lib/protocols_transport.c libtrace3-3.0.4.new/lib/protocols_transport.c
--- libtrace3-3.0.4/lib/protocols_transport.c	2008-01-02 21:09:40.000000000 +0000
+++ libtrace3-3.0.4.new/lib/protocols_transport.c	2009-04-06 00:08:08.000000000 +0100
@@ -1,6 +1,7 @@
 #include "libtrace.h"
 #include "protocols.h"
 #include <assert.h>
+#include <stdlib.h>
 
 DLLEXPORT void *trace_get_transport(const libtrace_packet_t *packet, 
 		uint8_t *proto,
Only in libtrace3-3.0.4.new/tools: Makefile

Reply via email to