From 85a8143a415984724b5198a05286c755fa01a94b Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Tue, 5 Feb 2008 13:35:26 +0000 Subject: [PATCH] - Use termios.h instead of sgtty.h PR: 120050 Submitted by: Ed Schouten --- .../annextools/files/patch-erpcd::erpcd.c | 9 +++ .../annextools/files/patch-netadm::dialout.c | 17 ++++++ net-mgmt/annextools/files/patch-netadm::rpc.c | 61 +++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 net-mgmt/annextools/files/patch-netadm::dialout.c create mode 100644 net-mgmt/annextools/files/patch-netadm::rpc.c diff --git a/net-mgmt/annextools/files/patch-erpcd::erpcd.c b/net-mgmt/annextools/files/patch-erpcd::erpcd.c index a46f707a89b3..f66a2046630b 100644 --- a/net-mgmt/annextools/files/patch-erpcd::erpcd.c +++ b/net-mgmt/annextools/files/patch-erpcd::erpcd.c @@ -1,5 +1,14 @@ --- erpcd/erpcd.c.orig Sat Jan 31 17:38:06 1998 +++ erpcd/erpcd.c Thu Sep 18 20:10:32 2003 +@@ -36,7 +36,7 @@ + #include + #include + #include +-#include ++#include + #include + #else + #include @@ -2108,11 +2108,7 @@ { int savederrno = errno; diff --git a/net-mgmt/annextools/files/patch-netadm::dialout.c b/net-mgmt/annextools/files/patch-netadm::dialout.c new file mode 100644 index 000000000000..2c33595ba7a5 --- /dev/null +++ b/net-mgmt/annextools/files/patch-netadm::dialout.c @@ -0,0 +1,17 @@ +--- netadm/dialout.c 2008-01-27 16:29:09.000000000 +0100 ++++ netadm/dialout.c 2008-01-27 16:36:23.000000000 +0100 +@@ -66,14 +66,6 @@ + + #include + +-#ifdef SYS_V +-#include +-#else +-#ifndef _WIN32 +-#include +-#endif +-#endif +- + #include "../inc/courier/courier.h" + #include "../inc/erpc/netadmp.h" + diff --git a/net-mgmt/annextools/files/patch-netadm::rpc.c b/net-mgmt/annextools/files/patch-netadm::rpc.c new file mode 100644 index 000000000000..c40c24518951 --- /dev/null +++ b/net-mgmt/annextools/files/patch-netadm::rpc.c @@ -0,0 +1,61 @@ +--- netadm/rpc.c 2008-01-27 16:29:09.000000000 +0100 ++++ netadm/rpc.c 2008-01-27 16:34:49.000000000 +0100 +@@ -35,7 +35,9 @@ + + #include + +-#ifdef SYS_V ++#ifdef __FreeBSD__ ++#include ++#elif defined(SYS_V) + #include + #else + #ifndef _WIN32 +@@ -749,7 +751,9 @@ + { + + #ifndef _WIN32 +-#ifdef SYS_V ++#ifdef __FreeBSD__ ++ struct termios tio; ++#elif defined(SYS_V) + struct termio tio; + #else + struct sgttyb sg; +@@ -762,7 +766,11 @@ + + fd = fileno(rfp); + +-#ifdef SYS_V ++#ifdef __FreeBSD__ ++ tcgetattr(fd, &tio); ++ tio.c_lflag &= ~(ECHO); ++ tcsetattr(fd, TCSANOW, &tio); ++#elif defined(SYS_V) + (void)ioctl(fd, (int)TCGETA, &tio); + tio.c_lflag &= ~(ECHO); + (void)ioctl(fd, (int)TCSETA, &tio); +@@ -779,7 +787,9 @@ + void devttyecho() /* turn echo on */ + { + #ifndef _WIN32 +-#ifdef SYS_V ++#ifdef __FreeBSD__ ++ struct termios tio; ++#elif defined(SYS_V) + struct termio tio; + #else + struct sgttyb sg; +@@ -792,7 +802,11 @@ + + fd = fileno(rfp); + +-#ifdef SYS_V ++#ifdef __FreeBSD__ ++ tcgetattr(fd, &tio); ++ tio.c_lflag |= ECHO; ++ tcsetattr(fd, TCSANOW, &tio); ++#elif defined(SYS_V) + (void)ioctl(fd, (int)TCGETA, &tio); + tio.c_lflag |= ECHO; + (void)ioctl(fd, (int)TCSETA, &tio);