mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-01-22 22:52:20 +08:00
better handling of termios header file
This commit is contained in:
parent
21fb127ce2
commit
66ffa994e9
@ -18,7 +18,7 @@ AC_CHECK_PROG([RPMBUILD], [rpmbuild], [rpmbuild], [rpm])
|
|||||||
AC_CHECK_PROG([SED], [sed], [sed])
|
AC_CHECK_PROG([SED], [sed], [sed])
|
||||||
|
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h termios.h])
|
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h])
|
||||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
||||||
AC_CHECK_HEADERS([sys/byteorder.h byteswap.h])
|
AC_CHECK_HEADERS([sys/byteorder.h byteswap.h])
|
||||||
|
|
||||||
@ -197,6 +197,13 @@ AC_CHECK_HEADER([linux/ipmi.h],
|
|||||||
[Define to 1 if you have the <sys/ipmi.h> header file.])],
|
[Define to 1 if you have the <sys/ipmi.h> header file.])],
|
||||||
[echo "** Unable to find OpenIPMI header files. Using internal version."])])
|
[echo "** Unable to find OpenIPMI header files. Using internal version."])])
|
||||||
|
|
||||||
|
dnl look for termios header file
|
||||||
|
AC_CHECK_HEADER([termios.h],
|
||||||
|
[AC_DEFINE(HAVE_TERMIOS_H, [1], [Define to 1 if you have <termios.h>.])],
|
||||||
|
[AC_CHECK_HEADER([sys/termios.h],
|
||||||
|
[AC_DEFINE(HAVE_SYS_TERMIOS_H, [1], [Define to 1 if you have <sys/termios.h>.])],
|
||||||
|
[echo "** Unable to find termios header file."])])
|
||||||
|
|
||||||
dnl set RPM distro tag for use in RPM name
|
dnl set RPM distro tag for use in RPM name
|
||||||
AC_ARG_WITH([rpm-distro],
|
AC_ARG_WITH([rpm-distro],
|
||||||
[AC_HELP_STRING([--with-rpm-distro=DISTRO],
|
[AC_HELP_STRING([--with-rpm-distro=DISTRO],
|
||||||
|
|||||||
@ -42,8 +42,13 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <termios.h>
|
#if defined(HAVE_TERMIOS_H)
|
||||||
|
# include <termios.h>
|
||||||
|
#elif defined (HAVE_SYS_TERMIOS_H)
|
||||||
|
# include <sys/termios.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ipmitool/helper.h>
|
#include <ipmitool/helper.h>
|
||||||
#include <ipmitool/log.h>
|
#include <ipmitool/log.h>
|
||||||
@ -99,7 +104,7 @@ ipmi_get_sol_info(
|
|||||||
struct ipmi_rq req;
|
struct ipmi_rq req;
|
||||||
uint8_t data[4];
|
uint8_t data[4];
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
memset(&req, 0, sizeof(req));
|
||||||
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
||||||
req.msg.cmd = IMPI_GET_SOL_CONFIG_PARAMETERS;
|
req.msg.cmd = IMPI_GET_SOL_CONFIG_PARAMETERS;
|
||||||
req.msg.data_len = 4;
|
req.msg.data_len = 4;
|
||||||
|
|||||||
@ -49,10 +49,11 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#include <config.h>
|
||||||
|
|
||||||
|
#if defined(HAVE_TERMIOS_H)
|
||||||
# include <termios.h>
|
# include <termios.h>
|
||||||
//# include <linux/termios.h>
|
#elif defined (HAVE_SYS_TERMIOS_H)
|
||||||
#else
|
|
||||||
# include <sys/termios.h>
|
# include <sys/termios.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -64,8 +65,6 @@
|
|||||||
#include <ipmitool/ipmi_strings.h>
|
#include <ipmitool/ipmi_strings.h>
|
||||||
#include <ipmitool/bswap.h>
|
#include <ipmitool/bswap.h>
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
static struct timeval _start_keepalive;
|
static struct timeval _start_keepalive;
|
||||||
static struct termios _saved_tio;
|
static struct termios _saved_tio;
|
||||||
static struct winsize _saved_winsize;
|
static struct winsize _saved_winsize;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user