Browse Source

lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined

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

Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Peter S. Mazinger 14 years ago
parent
commit
251f2266bf
2 changed files with 9 additions and 1 deletions
  1. 1 1
      libc/sysdeps/linux/common/lutimes.c
  2. 8 0
      libc/sysdeps/linux/common/stubs.c

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

+ 8 - 0
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