about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/local-store.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 56d97a048aad..cace5cb60b36 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -205,10 +205,10 @@ static void _canonicalisePathMetaData(const Path & path)
        users group); we check for this case below. */
     if (st.st_uid != geteuid()) {
 #if HAVE_LCHOWN
-        if (lchown(path.c_str(), geteuid(), -1) == -1)
+        if (lchown(path.c_str(), geteuid(), (gid_t) -1) == -1)
 #else
         if (!S_ISLNK(st.st_mode) &&
-            chown(path.c_str(), geteuid(), -1) == -1)
+            chown(path.c_str(), geteuid(), (gid_t) -1) == -1)
 #endif
             throw SysError(format("changing owner of `%1%' to %2%")
                 % path % geteuid());