From: Eric Sandeen <sandeen@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: Kyle McMartin <kyle@mcmartin.ca>
Subject: [PATCH] e4defrag: fix ppc build
Date: Sun, 23 Aug 2009 22:09:58 -0700 [thread overview]
Message-ID: <4A9220A6.7020000@redhat.com> (raw)
From: Kyle McMartin <kyle@mcmartin.ca>
ppc glibc seems to be missing sync_file_range, so we fell back
to the local define, and there ppc differs as well, so the
build was failing.
Thanks to Kyle for the patch w/ the tidy solution.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/misc/e4defrag.c b/misc/e4defrag.c
index 4c83fa3..23f01b8 100644
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -305,8 +305,10 @@ static int posix_fadvise(int fd, loff_t offset, size_t len, int advise)
#warning Using locally defined sync_file_range interface.
#ifndef __NR_sync_file_range
+#ifndef __NR_sync_file_range2 /* ppc */
#error Your kernel headers dont define __NR_sync_file_range
#endif
+#endif
/*
* sync_file_range() - Sync file region.
@@ -318,7 +320,11 @@ static int posix_fadvise(int fd, loff_t offset, size_t len, int advise)
*/
int sync_file_range(int fd, loff_t offset, loff_t length, unsigned int flag)
{
+#ifdef __NR_sync_file_range
return syscall(__NR_sync_file_range, fd, offset, length, flag);
+#else
+ return syscall(__NR_sync_file_range2, fd, flag, offset, length);
+#endif
}
#endif /* ! HAVE_SYNC_FILE_RANGE */
next reply other threads:[~2009-08-24 5:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 5:09 Eric Sandeen [this message]
2009-08-24 13:40 ` [PATCH] e4defrag: fix ppc build Greg Freemyer
2009-08-24 19:38 ` Theodore Tso
2009-08-28 23:41 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A9220A6.7020000@redhat.com \
--to=sandeen@redhat.com \
--cc=kyle@mcmartin.ca \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.