From 77b5c16af3bb1821c1851b48e62b8ef5e34f14f8 Mon Sep 17 00:00:00 2001 From: robert Date: Sun, 19 Apr 2020 12:43:42 +0000 Subject: [PATCH] fix a crash while using the -s option; the -s option requires an argument to be passed so add a leading : to getopt_long() --- sysutils/htop/Makefile | 4 ++-- sysutils/htop/patches/patch-htop_c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 sysutils/htop/patches/patch-htop_c diff --git a/sysutils/htop/Makefile b/sysutils/htop/Makefile index 55ce52f77bb..d6ddd48a41c 100644 --- a/sysutils/htop/Makefile +++ b/sysutils/htop/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.19 2019/07/12 20:49:43 sthen Exp $ +# $OpenBSD: Makefile,v 1.20 2020/04/19 12:43:42 robert Exp $ COMMENT = interactive process viewer V = 2.2.0 DISTNAME = htop-${V} -REVISION = 13 +REVISION = 14 CATEGORIES = sysutils diff --git a/sysutils/htop/patches/patch-htop_c b/sysutils/htop/patches/patch-htop_c new file mode 100644 index 00000000000..3c60e060c92 --- /dev/null +++ b/sysutils/htop/patches/patch-htop_c @@ -0,0 +1,14 @@ +$OpenBSD: patch-htop_c,v 1.1 2020/04/19 12:43:43 robert Exp $ + +Index: htop.c +--- htop.c.orig ++++ htop.c +@@ -93,7 +93,7 @@ static CommandLineSettings parseArguments(int argc, ch + + int opt, opti=0; + /* Parse arguments */ +- while ((opt = getopt_long(argc, argv, "hvCst::d:u:p:i", long_opts, &opti))) { ++ while ((opt = getopt_long(argc, argv, "hvCs:t::d:u:p:i", long_opts, &opti))) { + if (opt == EOF) break; + switch (opt) { + case 'h':