fix more warnings
This commit is contained in:
@@ -39,6 +39,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#if TORRENT_USE_RLIMIT
|
||||
#include <sys/resource.h>
|
||||
|
||||
// capture this here where warnings are disabled (the macro generates warnings)
|
||||
const rlim_t rlimit_as = RLIMIT_AS;
|
||||
const rlim_t rlim_infinity = RLIM_INFINITY;
|
||||
#endif
|
||||
|
||||
#ifdef TORRENT_BSD
|
||||
@@ -93,7 +97,7 @@ namespace libtorrent
|
||||
if (ret > 0)
|
||||
{
|
||||
struct rlimit r;
|
||||
if (getrlimit(RLIMIT_AS, &r) == 0 && r.rlim_cur != RLIM_INFINITY)
|
||||
if (getrlimit(rlimit_as, &r) == 0 && r.rlim_cur != rlim_infinity)
|
||||
{
|
||||
if (ret > r.rlim_cur)
|
||||
ret = r.rlim_cur;
|
||||
|
Reference in New Issue
Block a user