From 67f947c3741b8135b6856e17cde9af3115f3d069 Mon Sep 17 00:00:00 2001 From: Janek Walkenhorst Date: Wed, 17 Nov 2010 16:23:39 +0100 Subject: [PATCH] try other methods if utimensat is not supported (returns ENOSYS) --- source3/modules/vfs_default.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 6f5b09a..6e4e3a1 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -786,7 +786,11 @@ static int vfswrap_ntimes(vfs_handle_struct *handle, } else { result = utimensat(AT_FDCWD, smb_fname->base_name, NULL, 0); } -#elif defined(HAVE_UTIMES) + /* try other methods if utimensat is not supported */ + if (result == -1 && errno == ENOSYS) +#endif +{ +#if defined(HAVE_UTIMES) if (ft != NULL) { struct timeval tv[2]; tv[0] = convert_timespec_to_timeval(ft->atime); @@ -808,6 +812,7 @@ static int vfswrap_ntimes(vfs_handle_struct *handle, errno = ENOSYS; result = -1; #endif +} out: END_PROFILE(syscall_ntimes); -- 1.5.6.5