From 8bd7abbad1d199e0b15ab61d8c1b52ea57f9d73b Mon Sep 17 00:00:00 2001 From: brian Date: Mon, 5 Mar 2001 00:59:53 +0000 Subject: A NetBSD specific fix Kind-of obtained from: NetBSD --- usr.sbin/pppctl/pppctl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pppctl/pppctl.c') diff --git a/usr.sbin/pppctl/pppctl.c b/usr.sbin/pppctl/pppctl.c index 69a2556..3f14a6b 100644 --- a/usr.sbin/pppctl/pppctl.c +++ b/usr.sbin/pppctl/pppctl.c @@ -273,6 +273,9 @@ Terminal(void *v) struct thread_data *td; const char *l; int len; +#ifdef __NetBSD__ + HistEvent hev = { 0, "" }; +#endif act.sa_handler = InputHandler; sigemptyset(&act.sa_mask); @@ -285,7 +288,7 @@ Terminal(void *v) while ((l = SmartGets(td->edit, &len, td->ppp))) { if (len > 1) #ifdef __NetBSD__ - history(td->hist, NULL, H_ENTER, l); + history(td->hist, &hev, H_ENTER, l); #else history(td->hist, H_ENTER, l); #endif @@ -535,6 +538,9 @@ main(int argc, char **argv) struct thread_data td; const char *env; int size; +#ifdef __NetBSD__ + HistEvent hev = { 0, "" }; +#endif td.hist = history_init(); if ((env = getenv("EL_SIZE"))) { @@ -544,7 +550,7 @@ main(int argc, char **argv) } else size = 20; #ifdef __NetBSD__ - history(td.hist, NULL, H_SETSIZE, size); + history(td.hist, &hev, H_SETSIZE, size); td.edit = el_init("pppctl", stdin, stdout, stderr); #else history(td.hist, H_EVENT, size); -- cgit v1.1