tags 493196 + patch
severity 493196 important
thanks
Hi,
Please, can you estimate whether it can be solved on fakeroot side ?
Now I know, it can.
The problem is that chmod() syscall family does not return EPERM, but
EFTYPE in this case on *BSD kernels. The linux does not have errno code
EFTYPE at all.
Please, could you use attached patch.
It is no-op on Linux, as there is no EFTYPE defined, so it is really safe
change.
When applied, emacs22 builds fine for us.
Many thanks
Petr
--- fakeroot-1.9.5.orig/libfakeroot.c
+++ fakeroot-1.9.5/libfakeroot.c
@@ -856,6 +856,10 @@
r=next_chmod(path, mode);
if(r&&(errno==EPERM))
r=0;
+#ifdef EFTYPE /* available under FreeBSD kernel */
+ if(r&&(errno==EPERM))
+ r=0;
+#endif
return r;
}
@@ -884,6 +888,10 @@
r=next_fchmod(fd, mode);
if(r&&(errno==EPERM))
r=0;
+#ifdef EFTYPE /* available under FreeBSD kernel */
+ if(r&&(errno==EPERM))
+ r=0;
+#endif
return r;
}
@@ -916,6 +924,10 @@
r=next_fchmodat(dir_fd, path, mode, flags);
if(r&&(errno==EPERM))
r=0;
+#ifdef EFTYPE /* available under FreeBSD kernel */
+ if(r&&(errno==EPERM))
+ r=0;
+#endif
return r;
}
#endif /* HAVE_FCHMODAT */