From 154c73d56d8847aaf20c048ccc35c19c584890ce Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 14 Sep 2005 10:53:39 +0000 Subject: [PATCH] Some systems (HP-UX) don't yet have , putting select() in . Cope with this. Where _is_ available, though, use it (since it's where POSIX puts select()). Problem reported by Mike Protts. git-svn-id: svn://svn.tartarus.org/sgt/putty@6310 cda61777-01e9-0310-a592-d414129be87e --- unix/configure.ac | 5 ++++- unix/uxplink.c | 3 +++ unix/uxsftp.c | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/unix/configure.ac b/unix/configure.ac index 699e6ef8..40e6d569 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -14,7 +14,7 @@ if test "X$GCC" = Xyes; then CFLAGS="$CFLAGS -Wall -Werror" fi -AC_CHECK_HEADERS([utmpx.h],,,[ +AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[ #include #include ]) @@ -45,4 +45,7 @@ AH_BOTTOM([ #ifndef HAVE_PTSNAME # define BSD_PTYS #endif +#ifndef HAVE_SYS_SELECT_H +# define HAVE_NO_SYS_SELECT_H +#endif ]) diff --git a/unix/uxplink.c b/unix/uxplink.c index 755f1b2b..13dea441 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -13,7 +13,10 @@ #include #include #include +#include +#ifndef HAVE_NO_SYS_SELECT_H #include +#endif #define PUTTY_DO_GLOBALS /* actually _define_ globals */ #include "putty.h" diff --git a/unix/uxsftp.c b/unix/uxsftp.c index 60289eb2..3691cacc 100644 --- a/unix/uxsftp.c +++ b/unix/uxsftp.c @@ -13,6 +13,9 @@ #include #include #include +#ifndef HAVE_NO_SYS_SELECT_H +#include +#endif #include "putty.h" #include "psftp.h" -- 2.11.0