From 52ff163cd667d852b98635213b74c23c5c7c0445 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Tue, 15 Dec 2015 09:17:44 +0800 Subject: [PATCH] Fix a build error --- src/local.c | 2 ++ src/redir.c | 2 ++ src/server.c | 2 ++ src/tunnel.c | 2 ++ src/utils.c | 2 +- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/local.c b/src/local.c index 551237ad..484a3473 100644 --- a/src/local.c +++ b/src/local.c @@ -1044,9 +1044,11 @@ int main(int argc, char **argv) case 'a': user = optarg; break; +#ifdef HAVE_SETRLIMIT case 'n': nofile = atoi(optarg); break; +#endif case 'u': mode = TCP_AND_UDP; break; diff --git a/src/redir.c b/src/redir.c index 9aabe82b..05d6b7dc 100644 --- a/src/redir.c +++ b/src/redir.c @@ -675,9 +675,11 @@ int main(int argc, char **argv) case 'a': user = optarg; break; +#ifdef HAVE_SETRLIMIT case 'n': nofile = atoi(optarg); break; +#endif case 'u': mode = TCP_AND_UDP; break; diff --git a/src/server.c b/src/server.c index 4c8143d6..a3424d83 100644 --- a/src/server.c +++ b/src/server.c @@ -1346,9 +1346,11 @@ int main(int argc, char **argv) case 'a': user = optarg; break; +#ifdef HAVE_SETRLIMIT case 'n': nofile = atoi(optarg); break; +#endif case 'u': mode = TCP_AND_UDP; break; diff --git a/src/tunnel.c b/src/tunnel.c index bc5c0fd3..76d8ab92 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -747,9 +747,11 @@ int main(int argc, char **argv) case 'a': user = optarg; break; +#ifdef HAVE_SETRLIMIT case 'n': nofile = atoi(optarg); break; +#endif case 'v': verbose = 1; break; diff --git a/src/utils.c b/src/utils.c index 3c2aa64a..8e750997 100644 --- a/src/utils.c +++ b/src/utils.c @@ -233,7 +233,7 @@ void usage() " [-c ] The path to config file.\n"); #ifdef HAVE_SETRLIMIT printf( - " [-n ] Max number of open files, only available on Linux.\n"); + " [-n ] Max number of open files.\n"); #endif #ifndef MODULE_REDIR printf(