[RFC PATCH 24/38] truncate: prefer truncate64 syscall
Jonas Bonn
jonas at southpole.se
Tue Sep 6 08:30:48 UTC 2011
Signed-off-by: Jonas Bonn <jonas at southpole.se>
---
libc/sysdeps/linux/common/truncate.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/libc/sysdeps/linux/common/truncate.c b/libc/sysdeps/linux/common/truncate.c
index 2331bdd..990c1f1 100644
--- a/libc/sysdeps/linux/common/truncate.c
+++ b/libc/sysdeps/linux/common/truncate.c
@@ -11,5 +11,14 @@
#include <unistd.h>
+#ifdef __NR_truncate64
+int truncate(const char* path, __off_t length)
+{
+ return truncate64(path, length);
+}
+libc_hidden_def(truncate)
+
+#elif defined __NR_truncate
_syscall2(int, truncate, const char *, path, __off_t, length)
libc_hidden_def(truncate)
+#endif
--
1.7.5.4
More information about the uClibc
mailing list