summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppctl/pppctl.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-03-05 00:59:53 +0000
committerbrian <brian@FreeBSD.org>2001-03-05 00:59:53 +0000
commit8bd7abbad1d199e0b15ab61d8c1b52ea57f9d73b (patch)
treebe375b8dc8d5a97723f559a6968a56921664e4aa /usr.sbin/pppctl/pppctl.c
parent066e59e4fa613509a5ed41722efa3582c0922d4d (diff)
downloadFreeBSD-src-8bd7abbad1d199e0b15ab61d8c1b52ea57f9d73b.zip
FreeBSD-src-8bd7abbad1d199e0b15ab61d8c1b52ea57f9d73b.tar.gz
A NetBSD specific fix
Kind-of obtained from: NetBSD
Diffstat (limited to 'usr.sbin/pppctl/pppctl.c')
-rw-r--r--usr.sbin/pppctl/pppctl.c10
1 files changed, 8 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud