lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 23 Aug 2009 22:09:58 -0700
From:	Eric Sandeen <sandeen@...hat.com>
To:	linux-ext4@...r.kernel.org
CC:	Kyle McMartin <kyle@...artin.ca>
Subject: [PATCH] e4defrag: fix ppc build

From: Kyle McMartin <kyle@...artin.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@...hat.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 */
 

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ