[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 1 Jan 2014 12:28:23 +0200
From: Baruch Siach <baruch@...s.co.il>
To: Theodore Ts'o <tytso@....edu>
Cc: linux-ext4@...r.kernel.org, Baruch Siach <baruch@...s.co.il>
Subject: [PATCH] e4defrag: fix build when posix_fadvise is missing
uClibc declares posix_fadvise() even when the architecture does not provide
one. The static posix_fadvise() signature is not compatible with POSIX. Rename
the internal implementation to fix this. Fixes the following build failure
when building against uClibc:
e4defrag.c:189:2: warning: #warning Using locally defined posix_fadvise interface. [-Wcpp]
e4defrag.c:203:12: error: conflicting types for ‘posix_fadvise’
Signed-off-by: Baruch Siach <baruch@...s.co.il>
---
misc/e4defrag.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/misc/e4defrag.c b/misc/e4defrag.c
index c6a5f0d..4e84a74 100644
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -200,7 +200,8 @@ static struct frag_statistic_ino frag_rank[SHOW_FRAG_FILES];
* @len: area length.
* @advise: process flag.
*/
-static int posix_fadvise(int fd, loff_t offset, size_t len, int advise)
+#define posix_fadvise __posix_fadvise
+static int __posix_fadvise(int fd, loff_t offset, size_t len, int advise)
{
return syscall(__NR_fadvise64_64, fd, offset, len, advise);
}
--
1.8.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists