From d0fc615af658cb83e858b3c3c5e0d4c6c539ad66 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 5 Nov 2012 23:00:21 -0500 Subject: [PATCH] canonicalizePathMetaData: Fall-back to utimes if lutimes fails due to ENOSYS --- src/libstore/local-store.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 7fa278a91..b82c03f59 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -507,6 +507,8 @@ void canonicalisePathMetaData(const Path & path, bool recurse) times[1].tv_usec = 0; #if HAVE_LUTIMES if (lutimes(path.c_str(), times) == -1) + if (errno != ENOSYS || + (!S_ISLNK(st.st_mode) && utimes(path.c_str(), times) == -1)) #else if (!S_ISLNK(st.st_mode) && utimes(path.c_str(), times) == -1) #endif