Skip to contentSkip to conversation

e4defrag: fix ppc build

PATCH Applied Eric Sandeen 3 participants 4 messages Aug 24, 2009 – Aug 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e4defrag: fix ppc build

From: Kyle McMartin <[email protected]>

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.

---

misc/e4defrag.c +0 -0
index 4c83fa3..23f01b8 100644
@@ -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 */

#1 lore raw

misc/e4defrag.c

Quoted 12 lines · Eric Sandeen

From: Kyle McMartin <[email protected]>

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.

---

misc/e4defrag.c +0 -0

Eric,

Which git repository holds e4defrag.c? I assume it is public.

Greg

#2 lore raw
Quoted 9 lines · Greg Freemyer
Quoted 8 lines · Eric Sandeen

From: Kyle McMartin <[email protected]>

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.

Quoted 9 lines

misc/e4defrag.c

Quoted 4 lines

---

misc/e4defrag.c +0 -0

Eric,

Which git repository holds e4defrag.c? I assume it is public.

e4defrag can be found in the 'master', 'next', and 'pu' branches of the e2fsprogs repository. It's not in the 'maint' branch, so it's not in any of the e2fsprogs 1.41.x releases. The 'master' branch contains the in-development work that will be showing up in e2fsprogs 1.42; so far the big things that there is the on-going merge 64-bit block number support, and e4defrag.

- Ted