# HG changeset patch # User Leibo Wang # Date 1386816683 28800 # Node ID 7302abf31ae02dec013ba7bf188d249f31f59b59 # Parent b0666dd4d31de236bd2c99b990065c1f62ac2940 17347731 iftop core dumps when using more than one -f option 17363623 iftop should support 64-bit building for Solaris diff -r b0666dd4d31d -r 7302abf31ae0 components/iftop/Makefile --- a/components/iftop/Makefile Wed Dec 11 15:19:02 2013 -0800 +++ b/components/iftop/Makefile Wed Dec 11 18:51:23 2013 -0800 @@ -20,7 +20,7 @@ # # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # include ../../make-rules/shared-macros.mk @@ -59,9 +59,9 @@ # common targets -build: $(BUILD_32) +build: $(BUILD_64) -install: $(INSTALL_32) +install: $(INSTALL_64) test: $(NO_TESTS) diff -r b0666dd4d31d -r 7302abf31ae0 components/iftop/iftop.p5m --- a/components/iftop/iftop.p5m Wed Dec 11 15:19:02 2013 -0800 +++ b/components/iftop/iftop.p5m Wed Dec 11 18:51:23 2013 -0800 @@ -35,5 +35,5 @@ license iftop.license license='GPLv2' -file path=usr/sbin/iftop +file usr/bin/$(MACH64)/iftop path=usr/sbin/iftop file path=usr/share/man/man8/iftop.8 diff -r b0666dd4d31d -r 7302abf31ae0 components/iftop/patches/07.cfgfile.c.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/iftop/patches/07.cfgfile.c.patch Wed Dec 11 18:51:23 2013 -0800 @@ -0,0 +1,23 @@ +This patch fixed segfault when supplying multiple options like '-f' for iftop. +The fixing has been integrated into open iftop-1.0 pre-release version. We can +see the fixing log here: +http://www.ex-parrot.com/~pdw/iftop/cvs/iftop/ChangeLog + +--- cfgfile.c.orig 2013-12-02 00:37:09.851645000 -0800 ++++ cfgfile.c 2013-12-02 00:31:53.734822000 -0800 +@@ -230,8 +230,13 @@ + stringmap S; + + S = stringmap_find(config, directive); +- if (S) stringmap_delete_free(S); +- stringmap_insert(config, directive, item_ptr(xstrdup(s))); ++ if (S) { ++ xfree(S->d.v); ++ S->d = item_ptr(xstrdup(s)); ++ } ++ else { ++ stringmap_insert(config, directive, item_ptr(xstrdup(s))); ++ } + } + + int read_config(char *file, int whinge_on_error) {