|
@@ -11422,7 +11422,7 @@ static void raise_fd_limits(void)
|
|
|
{
|
|
{
|
|
|
#ifdef HAVE_SETRLIMIT
|
|
#ifdef HAVE_SETRLIMIT
|
|
|
struct rlimit fdlimit;
|
|
struct rlimit fdlimit;
|
|
|
- unsigned long old_soft_limit;
|
|
|
|
|
|
|
+ rlim_t old_soft_limit;
|
|
|
char frombuf[0x10] = "unlimited";
|
|
char frombuf[0x10] = "unlimited";
|
|
|
char hardbuf[0x10] = "unlimited";
|
|
char hardbuf[0x10] = "unlimited";
|
|
|
|
|
|
|
@@ -11439,11 +11439,11 @@ static void raise_fd_limits(void)
|
|
|
if (fdlimit.rlim_max != RLIM_INFINITY)
|
|
if (fdlimit.rlim_max != RLIM_INFINITY)
|
|
|
snprintf(hardbuf, sizeof(hardbuf), "%lu", (unsigned long)fdlimit.rlim_max);
|
|
snprintf(hardbuf, sizeof(hardbuf), "%lu", (unsigned long)fdlimit.rlim_max);
|
|
|
if (old_soft_limit != RLIM_INFINITY)
|
|
if (old_soft_limit != RLIM_INFINITY)
|
|
|
- snprintf(frombuf, sizeof(frombuf), "%lu", old_soft_limit);
|
|
|
|
|
|
|
+ snprintf(frombuf, sizeof(frombuf), "%lu", (unsigned long)old_soft_limit);
|
|
|
|
|
|
|
|
if (fdlimit.rlim_cur == old_soft_limit)
|
|
if (fdlimit.rlim_cur == old_soft_limit)
|
|
|
applogr(, LOG_DEBUG, "setrlimit: Soft fd limit not being changed from %lu (FD_SETSIZE=%lu; hard limit=%s)",
|
|
applogr(, LOG_DEBUG, "setrlimit: Soft fd limit not being changed from %lu (FD_SETSIZE=%lu; hard limit=%s)",
|
|
|
- old_soft_limit, (unsigned long)FD_SETSIZE, hardbuf);
|
|
|
|
|
|
|
+ (unsigned long)old_soft_limit, (unsigned long)FD_SETSIZE, hardbuf);
|
|
|
|
|
|
|
|
if (setrlimit(RLIMIT_NOFILE, &fdlimit))
|
|
if (setrlimit(RLIMIT_NOFILE, &fdlimit))
|
|
|
applogr(, LOG_DEBUG, "setrlimit: Failed to change soft fd limit from %s to %lu (FD_SETSIZE=%lu; hard limit=%s)",
|
|
applogr(, LOG_DEBUG, "setrlimit: Failed to change soft fd limit from %s to %lu (FD_SETSIZE=%lu; hard limit=%s)",
|