openbsd-ports/databases/mytop/patches/patch-mytop
giovanni 4ee9e37040 Add a couple of patches from Debian and take maintainership
ok Dave Steinberg (old maintainer)
2012-03-08 09:30:59 +00:00

26 lines
925 B
Plaintext

$OpenBSD: patch-mytop,v 1.1 2012/03/08 09:30:59 giovanni Exp $
--- mytop.orig Sat Feb 17 05:57:46 2007
+++ mytop Tue Feb 28 13:18:20 2012
@@ -153,7 +153,7 @@ GetOptions(
"idle|i" => \$config{idle},
"resolve|r" => \$config{resolve},
"prompt!" => \$config{prompt},
- "long|!" => \$config{long_nums},
+ "long!" => \$config{long_nums},
"mode|m=s" => \$config{mode},
"sort=s" => \$config{sort},
);
@@ -952,8 +952,10 @@ sub GetData()
{
$thread->{Host} =~ s/:\d+$//;
my $host = gethostbyaddr(inet_aton($thread->{Host}), AF_INET);
- $host =~ s/^([^.]+).*/$1/;
- $thread->{Host} = $host;
+ if ($host) {
+ $host =~ s/^([^.]+).*/$1/;
+ $thread->{Host} = $host;
+ }
}
## Fix possible undefs