dietlibc/dietlibc-0.28-stat64.patch
ensc 4d9260872d - catch the case when syscall(2) is used on archs where it is not
implemented yet
- define MADV_* constants on HPPA and IA64 archs
- fix *truncate64() handling on 64bit archs
2005-04-24 19:49:59 +00:00

21 lines
586 B
Diff

2005-04-24 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
* include/unistd.h: do not define *truncate to *truncate64
when latter function group is not available (e.g. in 64bit
machines)
--- dietlibc-0.28/include/unistd.h.stat64
+++ dietlibc-0.28/include/unistd.h
@@ -246,9 +246,12 @@
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
#define open open64
#define creat creat64
+#define getdents getdents64
+
+#ifndef __NO_STAT64
#define truncate truncate64
#define ftruncate ftruncate64
-#define getdents getdents64
+#endif
#endif
#ifdef _LINUX_SOURCE