From: Karel Zak Date: Mon, 8 Jun 2020 11:18:20 +0000 (+0200) Subject: build-sys: fix irqtop compilation with -lslang X-Git-Tag: v2.36-rc1~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5868026e2c8fe894d2c1d9ffb117f9024bbd54a1;p=thirdparty%2Futil-linux.git build-sys: fix irqtop compilation with -lslang Signed-off-by: Karel Zak --- diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am index daeb34f890..5855e1cc1a 100644 --- a/sys-utils/Makemodule.am +++ b/sys-utils/Makemodule.am @@ -57,8 +57,14 @@ irqtop_SOURCES = sys-utils/irqtop.c \ sys-utils/irq-common.c \ sys-utils/irq-common.h \ lib/monotonic.c -irqtop_LDADD = $(LDADD) libcommon.la $(NCURSES_LIBS) $(REALTIME_LIBS) libsmartcols.la -irqtop_CFLAGS = $(AM_CFLAGS) $(NCURSES_CFLAGS) -I$(ul_libsmartcols_incdir) +irqtop_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS) libsmartcols.la +irqtop_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) +if HAVE_SLANG +irqtop_LDADD += -lslang +else +irqtop_CFLAGS += $(NCURSES_CFLAGS) +irqtop_LDADD += $(NCURSES_LIBS) +endif endif if BUILD_LSIRQ diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c index 107bcdf6df..4363fffb75 100644 --- a/sys-utils/irqtop.c +++ b/sys-utils/irqtop.c @@ -188,7 +188,9 @@ static int event_loop(struct irqtop_ctl *ctl, struct irq_output *out) } if (siginfo.ssi_signo == SIGWINCH) { get_terminal_dimension(&ctl->cols, &ctl->rows); +#if HAVE_RESIZETERM resizeterm(ctl->rows, ctl->cols); +#endif } else { ctl->request_exit = 1; @@ -319,7 +321,9 @@ int main(int argc, char **argv) ctl.win = initscr(); get_terminal_dimension(&ctl.cols, &ctl.rows); +#if HAVE_RESIZETERM resizeterm(ctl.rows, ctl.cols); +#endif curs_set(0); ctl.hostname = xgethostname();