diff options
author | novel <novel@FreeBSD.org> | 2006-01-23 18:15:34 +0800 |
---|---|---|
committer | novel <novel@FreeBSD.org> | 2006-01-23 18:15:34 +0800 |
commit | 436b588c273a703f1cb3afc5bbce9774a71a90f3 (patch) | |
tree | d4628f3e778e0cece1853655f74fd32d869cab44 /comms | |
parent | 4d4ec10da2c8a10611a7806edf600db0a89e1c2f (diff) | |
download | freebsd-ports-gnome-436b588c273a703f1cb3afc5bbce9774a71a90f3.tar.gz freebsd-ports-gnome-436b588c273a703f1cb3afc5bbce9774a71a90f3.tar.zst freebsd-ports-gnome-436b588c273a703f1cb3afc5bbce9774a71a90f3.zip |
Fix build on recent -CURRENT.
PR: 92131
Submitted by: Stepan Zastupov, glebius
Diffstat (limited to 'comms')
-rw-r--r-- | comms/ltmdm/files/patch-sys-dev-ltmdm-ltmdmsio.c | 66 |
1 files changed, 45 insertions, 21 deletions
diff --git a/comms/ltmdm/files/patch-sys-dev-ltmdm-ltmdmsio.c b/comms/ltmdm/files/patch-sys-dev-ltmdm-ltmdmsio.c index 27b26c8b5b40..8c05ac3d31b8 100644 --- a/comms/ltmdm/files/patch-sys-dev-ltmdm-ltmdmsio.c +++ b/comms/ltmdm/files/patch-sys-dev-ltmdm-ltmdmsio.c @@ -1,5 +1,5 @@ --- sys/dev/ltmdm/ltmdmsio.c.orig Tue Mar 12 04:47:31 2002 -+++ sys/dev/ltmdm/ltmdmsio.c Sat Nov 5 07:27:48 2005 ++++ sys/dev/ltmdm/ltmdmsio.c Wed Jan 18 16:43:17 2006 @@ -60,7 +60,9 @@ #include <sys/proc.h> #include <sys/module.h> @@ -286,7 +286,19 @@ { struct com_s *com; int error; -@@ -1610,7 +1690,11 @@ +@@ -1488,7 +1568,11 @@ + return (ENXIO); + if (mynor & CONTROL_MASK) + return (0); ++#if __FreeBSD_version >= 700012 ++ tp = dev->si_tty = com->tp = ttyalloc(); ++#else + tp = dev->si_tty = com->tp = ttymalloc(com->tp); ++#endif + s = splfunc(); + /* + * We jump to this label after all non-interrupted sleeps to pick +@@ -1610,7 +1694,11 @@ * the true carrier. */ if (com->prev_modem_status & MSR_DCD || mynor & CALLOUT_MASK) @@ -298,7 +310,7 @@ } /* * Wait for DCD if necessary. -@@ -1626,7 +1710,11 @@ +@@ -1626,7 +1714,11 @@ goto out; goto open_top; } @@ -310,7 +322,7 @@ disc_optim(tp, &tp->t_termios, com); if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) com->active_out = TRUE; -@@ -1639,7 +1727,11 @@ +@@ -1639,7 +1731,11 @@ } static int @@ -322,7 +334,7 @@ { struct com_s *com; int mynor; -@@ -1654,11 +1746,19 @@ +@@ -1654,11 +1750,19 @@ return (ENODEV); tp = com->tp; s = splfunc(); @@ -342,7 +354,7 @@ siosettimeout(); splx(s); if (com->gone) { -@@ -1685,7 +1785,9 @@ +@@ -1685,7 +1789,9 @@ s = splfunc(); com->do_timestamp = FALSE; com->do_dcd_timestamp = FALSE; @@ -352,7 +364,7 @@ write_vuart_port(UART_CFCR, com->cfcr_image &= ~CFCR_SBREAK); { write_vuart_port(UART_IER, 0); -@@ -1724,7 +1826,11 @@ +@@ -1724,7 +1830,11 @@ } static int @@ -364,7 +376,7 @@ { int mynor; struct com_s *com; -@@ -1735,11 +1841,19 @@ +@@ -1735,11 +1845,19 @@ com = com_addr(MINOR_TO_UNIT(mynor)); if (com == NULL || com->gone) return (ENODEV); @@ -384,7 +396,7 @@ { int mynor; struct com_s *com; -@@ -1754,7 +1868,11 @@ +@@ -1754,7 +1872,11 @@ if (com == NULL || com->gone) return (ENODEV); @@ -396,7 +408,7 @@ } static void -@@ -1860,7 +1978,11 @@ +@@ -1860,7 +1982,11 @@ if (line_status & LSR_PE) recv_data |= TTY_PE; } @@ -408,7 +420,7 @@ lt_disable_intr(); } while (buf < com->iptr); } -@@ -1894,23 +2016,34 @@ +@@ -1894,23 +2020,34 @@ u_char recv_data; u_char int_ctl; u_char int_ctl_new; @@ -443,7 +455,7 @@ line_status = read_vuart_port(UART_LSR); /* input event? (check first to help avoid overruns) */ -@@ -1948,7 +2081,11 @@ +@@ -1948,7 +2085,11 @@ recv_data = 0; } ++com->bytes_in; @@ -455,7 +467,7 @@ setsofttty(); ioptr = com->iptr; if (ioptr >= com->ibufend) -@@ -2053,7 +2190,11 @@ +@@ -2053,17 +2194,23 @@ } static int @@ -467,7 +479,19 @@ { struct com_s *com; int error; -@@ -2103,6 +2244,7 @@ + int mynor; + int s; + struct tty *tp; ++#if __FreeBSD_version < 700003 + #if defined(COMPAT_43) || defined(COMPAT_SUNOS) + u_long oldcmd; + struct termios term; + #endif ++#endif + + mynor = minor(dev); + com = com_addr(MINOR_TO_UNIT(mynor)); +@@ -2103,6 +2250,7 @@ } } tp = com->tp; @@ -475,7 +499,7 @@ #if defined(COMPAT_43) || defined(COMPAT_SUNOS) term = tp->t_termios; oldcmd = cmd; -@@ -2112,6 +2254,7 @@ +@@ -2112,6 +2260,7 @@ if (cmd != oldcmd) data = (caddr_t)&term; #endif @@ -483,7 +507,7 @@ if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { int cc; struct termios *dt = (struct termios *)data; -@@ -2134,7 +2277,11 @@ +@@ -2134,7 +2283,11 @@ if (lt->c_ospeed != 0) dt->c_ospeed = tp->t_ospeed; } @@ -495,7 +519,7 @@ if (error != ENOIOCTL) return (error); s = splfunc(); -@@ -2189,13 +2336,17 @@ +@@ -2189,13 +2342,17 @@ com->do_timestamp = TRUE; *(struct timeval *)data = com->timestamp; break; @@ -513,7 +537,7 @@ if (error == ENODEV) error = ENOTTY; return (error); -@@ -2257,8 +2408,13 @@ +@@ -2257,8 +2414,13 @@ com->state &= ~CS_CHECKMSR; lt_enable_intr(); if (delta_modem_status & MSR_DCD) @@ -527,7 +551,7 @@ } if (com->state & CS_ODONE) { lt_disable_intr(); -@@ -2270,7 +2426,11 @@ +@@ -2270,7 +2432,11 @@ sio_busycheck_handle = timeout(siobusycheck, com, hz / 100); com->extra_state |= CSE_BUSYCHECK; } @@ -539,7 +563,7 @@ } if (com_events == 0) break; -@@ -2769,11 +2929,21 @@ +@@ -2769,11 +2935,21 @@ && (!(t->c_iflag & PARMRK) || (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK)) && !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN)) @@ -561,7 +585,7 @@ } #ifdef KLD_MODULE -@@ -2796,7 +2966,7 @@ +@@ -2796,7 +2972,7 @@ #endif DRIVER_MODULE(ltmdm, pci, ltmdm_pci_driver, ltmdm_devclass, ltmdm_event, 0); |