summaryrefslogtreecommitdiff
path: root/ssh-keyscan.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-12-27 07:06:21 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-12-27 07:06:21 +0000
commit5adbad22cb626a0156edff3a93321a6580990218 (patch)
tree5df31d7dbe057fd2e483ac7ee0338461d548eb92 /ssh-keyscan.c
parentfa610a17a3d8251bec7b0a869eae6aadb1ea3c55 (diff)
This should bring NeXTStep back into the family of supported operating
systems. - (bal) Fixed NeXT's lack of CPPFLAGS honoring. - (bal) ssh-keyscan.c: NeXT (and older BSDs) don't support getrlimit() w/ 'RLIMIT_NOFILE'
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r--ssh-keyscan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 41bd733c..f630e8c7 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -183,7 +183,7 @@ getline(Linebuf * lb)
static int
fdlim_get(int hard)
{
-#if defined(HAVE_GETRLIMIT)
+#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE)
struct rlimit rlfd;
if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0)
return (-1);
@@ -201,12 +201,12 @@ fdlim_get(int hard)
static int
fdlim_set(int lim)
{
-#if defined(HAVE_SETRLIMIT)
+#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)
struct rlimit rlfd;
#endif
if (lim <= 0)
return (-1);
-#if defined(HAVE_SETRLIMIT)
+#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)
if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0)
return (-1);
rlfd.rlim_cur = lim;