From d7f7e8ac877496bb695ab49237bdef12681b3889 Mon Sep 17 00:00:00 2001 From: Yongting You <2010youy01@gmail.com> Date: Fri, 17 Mar 2023 12:32:38 -0700 Subject: [PATCH] fix rlim_t type print issue. Signed-off-by: Yongting You <2010youy01@gmail.com> --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index a1b64781..49908307 100644 --- a/src/main.c +++ b/src/main.c @@ -841,9 +841,9 @@ main(int argc, char** argv) #ifdef HAVE_LINUX sd_notifyf(0, "STATUS=max_connections is larger than the file descriptor limit (%ld available)", - flimit.rlim_cur - 30); + (long)(flimit.rlim_cur - 30)); #endif - errx(1, "max_connections is larger than the file descriptor limit (%ld available)", flimit.rlim_cur - 30); + errx(1, "max_connections is larger than the file descriptor limit (%ld available)", (long)(flimit.rlim_cur - 30)); } if (daemon)