Fix build when libutil.h exists but is deprecated
This commit is contained in:
@@ -159,6 +159,11 @@ AC_CHECK_DECL([signalfd],
|
||||
[Define if signalfd is available.])],
|
||||
, [[#include <sys/signalfd.h>]])
|
||||
|
||||
AC_CHECK_DECL([forkpty],
|
||||
[AC_DEFINE([FORKPTY_IN_LIBUTIL], [1],
|
||||
[Define if libutil.h necessary for forkpty().])],
|
||||
, [[#include <libutil.h>]])
|
||||
|
||||
AC_CHECK_DECL([htobe64],
|
||||
[AC_DEFINE([HAVE_HTOBE64], [1],
|
||||
[Define if htobe64 and friends exist.])],
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#ifdef HAVE_LIBUTIL_H
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
@@ -59,6 +56,10 @@ extern "C" {
|
||||
#include <util.h>
|
||||
#endif
|
||||
|
||||
#if FORKPTY_IN_LIBUTIL
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
|
||||
#include "networktransport.cc"
|
||||
|
||||
typedef Network::Transport< Terminal::Complete, Network::UserStream > ServerConnection;
|
||||
|
||||
Reference in New Issue
Block a user