Only use RLIMIT_NOFILE if it's defined.

This commit is contained in:
Darren Tucker 2019-10-28 17:05:36 +11:00
parent d561b0b2fa
commit 7694e9d2fb
1 changed files with 2 additions and 0 deletions

View File

@ -1113,8 +1113,10 @@ main(int ac, char **av)
platform_disable_tracing(0); /* strict=no */
#ifdef RLIMIT_NOFILE
if (getrlimit(RLIMIT_NOFILE, &rlim) == -1)
fatal("%s: getrlimit: %s", __progname, strerror(errno));
#endif
__progname = ssh_get_progname(av[0]);
seed_rng();