summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac49
1 files changed, 2 insertions, 47 deletions
diff --git a/configure.ac b/configure.ac
index 95a2a8d1d..c471e7f35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.482 2011/09/29 13:17:21 dtucker Exp $ 1# $Id: configure.ac,v 1.483 2011/10/02 07:49:24 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) 17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
18AC_REVISION($Revision: 1.482 $) 18AC_REVISION($Revision: 1.483 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20AC_LANG([C]) 20AC_LANG([C])
21 21
@@ -2506,51 +2506,6 @@ elif test "x$sandbox_arg" = "xrlimit" || \
2506 AC_MSG_ERROR([rlimit sandbox requires setrlimit function]) 2506 AC_MSG_ERROR([rlimit sandbox requires setrlimit function])
2507 SANDBOX_STYLE="rlimit" 2507 SANDBOX_STYLE="rlimit"
2508 AC_DEFINE([SANDBOX_RLIMIT], [1], [Sandbox using setrlimit(2)]) 2508 AC_DEFINE([SANDBOX_RLIMIT], [1], [Sandbox using setrlimit(2)])
2509
2510 AC_MSG_CHECKING([if select works with zero available fds])
2511 AC_RUN_IFELSE(
2512 [AC_LANG_PROGRAM([[
2513#include <sys/time.h>
2514#ifdef HAVE_SYS_SELECT_H
2515#include <sys/select.h>
2516#endif
2517#ifdef HAVE_SYS_STAT_H
2518#include <sys/stat.h>
2519#endif
2520#include <sys/resource.h>
2521#include <errno.h>
2522#include <fcntl.h>
2523#include <stdio.h>
2524#include <stdlib.h>
2525 ]], [[
2526 struct rlimit rl_zero;
2527 int fd, r;
2528 fd_set fds;
2529
2530 fd = open("/dev/null", O_RDWR);
2531 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
2532 setrlimit(RLIMIT_FSIZE, &rl_zero);
2533 setrlimit(RLIMIT_NOFILE, &rl_zero);
2534 FD_ZERO(&fds);
2535 FD_SET(fd, &fds);
2536 r = select(fd+1, &fds, NULL, NULL, NULL);
2537 if (r == -1)
2538 exit(1);
2539 exit(0);
2540 ]])], [
2541 AC_MSG_RESULT(yes)
2542 AC_DEFINE([SELECT_REQUIRED_FDS], [0],
2543 [number of available fds required for select])
2544 ], [
2545 AC_MSG_RESULT(no)
2546 AC_DEFINE([SELECT_REQUIRED_FDS], [1],
2547 [number of available fds required for select])
2548 ], [
2549 AC_MSG_RESULT([cross-compiling, assuming yes])
2550 AC_DEFINE([SELECT_REQUIRED_FDS], [0],
2551 [assuming select works with zero free fds])
2552 ]
2553 )
2554elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \ 2509elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
2555 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then 2510 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
2556 SANDBOX_STYLE="none" 2511 SANDBOX_STYLE="none"