diff --git a/fs/procfs/fs_procfsuptime.c b/fs/procfs/fs_procfsuptime.c index ff2167b8dea..2ea9071d6f0 100644 --- a/fs/procfs/fs_procfsuptime.c +++ b/fs/procfs/fs_procfsuptime.c @@ -266,9 +266,11 @@ static ssize_t uptime_read(FAR struct file *filep, FAR char *buffer, /* Convert the seconds + hundredths of seconds to a string */ #ifdef CONFIG_SYSTEM_TIME64 - linesize = snprintf(attr->line, UPTIME_LINELEN, "%7llu.%02u\n", sec, csec); + linesize = snprintf(attr->line, UPTIME_LINELEN, "%7llu.%02u\n", + sec, csec); #else - linesize = snprintf(attr->line, UPTIME_LINELEN, "%7lu.%02u\n", sec, csec); + linesize = snprintf(attr->line, UPTIME_LINELEN, "%7lu.%02u\n", + (unsigned long)sec, csec); #endif #endif