summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/responder/common/responder_common.c10
-rw-r--r--src/util/sss_format.h7
2 files changed, 12 insertions, 5 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 58a92f97..908031a0 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -999,7 +999,7 @@ void responder_set_fd_limit(rlim_t fd_limit)
limret = setrlimit(RLIMIT_NOFILE, &new_limit);
if (limret == 0) {
DEBUG(SSSDBG_CONF_SETTINGS,
- ("Maximum file descriptors set to [%d]\n",
+ ("Maximum file descriptors set to [%"SPRIrlim"]\n",
new_limit.rlim_cur));
return;
}
@@ -1012,7 +1012,7 @@ void responder_set_fd_limit(rlim_t fd_limit)
limret = getrlimit(RLIMIT_NOFILE, &current_limit);
if (limret == 0) {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Current fd limit: [%d]\n",
+ ("Current fd limit: [%"SPRIrlim"]\n",
current_limit.rlim_cur));
/* Choose the lesser of the requested and the hard limit */
if (current_limit.rlim_max < fd_limit) {
@@ -1025,12 +1025,12 @@ void responder_set_fd_limit(rlim_t fd_limit)
limret = setrlimit(RLIMIT_NOFILE, &new_limit);
if (limret == 0) {
DEBUG(SSSDBG_CONF_SETTINGS,
- ("Maximum file descriptors set to [%d]\n",
+ ("Maximum file descriptors set to [%"SPRIrlim"]\n",
new_limit.rlim_cur));
} else {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not set new fd limits. Proceeding with [%d]\n",
- current_limit.rlim_cur));
+ ("Could not set new fd limits. Proceeding with "
+ "[%"SPRIrlim"]\n", current_limit.rlim_cur));
}
} else {
DEBUG(SSSDBG_CRIT_FAILURE,
diff --git a/src/util/sss_format.h b/src/util/sss_format.h
index ac3d3828..a922ee36 100644
--- a/src/util/sss_format.h
+++ b/src/util/sss_format.h
@@ -32,4 +32,11 @@
/* key_serial_t is defined in keyutils.h as typedef int32_t */
#define SPRIkey_ser PRId32
+/* rlim_t is defined with conditional build as unsigned type.
+ * It seems that sizeof(rlim_t) is 8. It may be platform dependent, therefore
+ * the same format will be used like with uint64_t.
+ */
+
+#define SPRIrlim PRIu64
+
#endif /* __SSS_FORMAT_H__ */