From 3fb6b4c9ec7f90c18d234bd9deb04df037527e23 Mon Sep 17 00:00:00 2001 From: zhangshoukui Date: Fri, 28 Jun 2024 10:20:46 +0800 Subject: [PATCH] fix mmap compile error. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mmap/fs_rammap.c:81:39: error: expected ‘)’ before ‘PRIdOFF’ 81 | ferr("ERRORL Seek to position %"PRIdOFF" failed\n", fpos); | ^~~~~~~ mmap/fs_rammap.c:81:12: warning: spurious trailing ‘%’ in format [-Wformat=] 81 | ferr("ERRORL Seek to position %"PRIdOFF" failed\n", fpos); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mmap/fs_rammap.c:81:37: note: format string is defined here 81 | ferr("ERRORL Seek to position %"PRIdOFF" failed\n", fpos); | ^ In file included from mmap/fs_rammap.c:30: mmap/fs_rammap.c:98:51: error: expected ‘)’ before ‘PRIdOFF’ 98 | ferr("ERROR: Write failed: offset=%"PRIdOFF" nwrite=%zd\n", | ^~~~~~~ mmap/fs_rammap.c:98:20: warning: spurious trailing ‘%’ in format [-Wformat=] 98 | ferr("ERROR: Write failed: offset=%"PRIdOFF" nwrite=%zd\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mmap/fs_rammap.c:98:49: note: format string is defined here 98 | ferr("ERROR: Write failed: offset=%"PRIdOFF" nwrite=%zd\n", Signed-off-by: zhangshoukui --- fs/mmap/fs_rammap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/mmap/fs_rammap.c b/fs/mmap/fs_rammap.c index 7f31ba5b61..c011d2a943 100644 --- a/fs/mmap/fs_rammap.c +++ b/fs/mmap/fs_rammap.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include