diff --git a/fs/procfs/fs_procfscpuload.c b/fs/procfs/fs_procfscpuload.c index da13d72e6f..ee6970441e 100644 --- a/fs/procfs/fs_procfscpuload.c +++ b/fs/procfs/fs_procfscpuload.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -252,7 +253,8 @@ static ssize_t cpuload_read(FAR struct file *filep, FAR char *buffer, fracpart = 0; } - linesize = snprintf(attr->line, CPULOAD_LINELEN, "%3d.%01d%%\n", + linesize = snprintf(attr->line, CPULOAD_LINELEN, + "%3" PRId32 ".%01" PRId32 "%%\n", intpart, fracpart); /* Save the linesize in case we are re-entered with f_pos > 0 */