[git commit prelink] lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined

Peter S. Mazinger ps.m at gmx.net
Wed Mar 30 11:53:36 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=251f2266bf24b1b396f59eef60d0acf41fdd02e4
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/prelink

while there, provide stubs for functions depending on utimensat syscall.

Reported-by: Sedat Dilek <sedat.dilek at googlemail.com>
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 libc/sysdeps/linux/common/lutimes.c |    2 +-
 libc/sysdeps/linux/common/stubs.c   |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/libc/sysdeps/linux/common/lutimes.c b/libc/sysdeps/linux/common/lutimes.c
index 0b4a8ea..e01d40e 100644
--- a/libc/sysdeps/linux/common/lutimes.c
+++ b/libc/sysdeps/linux/common/lutimes.c
@@ -12,7 +12,7 @@
 
 #ifdef __NR_lutimes
 _syscall2(int, lutimes, const char *, file, const struct timeval *, tvp)
-#else
+#elif defined __NR_utimensat
 #include <sys/time.h>
 #include <fcntl.h>
 
diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
index 8688e98..655c640 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -172,6 +172,14 @@ make_stub(umount)
 make_stub(umount2)
 #endif
 
+#ifndef __NR_utimensat
+make_stub(futimens)
+make_stub(utimensat)
+# ifndef __NR_lutimes
+make_stub(lutimes)
+# endif
+#endif
+
 #ifndef __NR_vmsplice
 make_stub(vmsplice)
 #endif
-- 
1.7.3.4



More information about the uClibc-cvs mailing list