Skip to content

Commit

Permalink
Fix type mismatch under musl.
Browse files Browse the repository at this point in the history
It complains about rl.rlim_cur and rl.rlim_max being
long long unsigned, so cast them, since it's debug
messages anyway.
  • Loading branch information
gonzoleeman committed Apr 2, 2020
1 parent 6ed14d4 commit fbe6c1c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions usr/iscsi_util.c
Expand Up @@ -152,7 +152,9 @@ int increase_max_files(void)
log_debug(1, "Could not get file limit (err %d)", errno);
return errno;
}
log_debug(1, "Max file limits %lu %lu", rl.rlim_cur, rl.rlim_max);
log_debug(1, "Max file limits %lu %lu",
(long unsigned)rl.rlim_cur,
(long unsigned)rl.rlim_max);

if (rl.rlim_cur < ISCSI_MAX_FILES)
rl.rlim_cur = ISCSI_MAX_FILES;
Expand All @@ -162,7 +164,8 @@ int increase_max_files(void)
err = setrlimit(RLIMIT_NOFILE, &rl);
if (err) {
log_debug(1, "Could not set file limit to %lu/%lu (err %d)",
rl.rlim_cur, rl.rlim_max, errno);
(long unsigned)rl.rlim_cur,
(long unsigned)rl.rlim_max, errno);
return errno;
}

Expand Down

0 comments on commit fbe6c1c

Please sign in to comment.