found a much simpler case that kills the posix locking
[kai/samba.git] / source3 / smbd / vfs-wrap.c
index 24e45a6d24a3f18f51a01473764cf3e4daf03d6d..5db1689450027055620c0a2a410efb9aa04742ba 100644 (file)
@@ -204,9 +204,13 @@ int vfswrap_rename(char *old, char *new)
     return result;
 }
 
-void vfswrap_fsync(int fd)
+int vfswrap_fsync(int fd)
 {
-    fsync(fd);
+#ifdef HAVE_FSYNC
+    return fsync(fd);
+#else
+       return 0;
+#endif
 }
 
 int vfswrap_stat(char *fname, SMB_STRUCT_STAT *sbuf)
@@ -293,3 +297,16 @@ int vfswrap_utime(char *path, struct utimbuf *times)
     result = utime(path, times);
     return result;
 }
+
+int vfswrap_ftruncate(int fd, SMB_OFF_T offset)
+{
+    int result;
+
+    result = sys_ftruncate(fd, offset);
+    return result;
+}
+
+BOOL vfswrap_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+{
+       return fcntl_lock(fd, op, offset, count,type);
+}