diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index c20ab77dc4..3cbf4587a9 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -769,7 +770,8 @@ static ssize_t proc_loadavg(FAR struct proc_file_s *procfile, fracpart = 0; } - linesize = snprintf(procfile->line, STATUS_LINELEN, "%3d.%01d%%", + linesize = snprintf(procfile->line, STATUS_LINELEN, + "%3" PRId32 ".%01" PRId32 "%%", intpart, fracpart); copysize = procfs_memcpy(procfile->line, linesize, buffer, buflen, &offset);