diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 02a0659a7..31601182c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2010-01-13 Corinna Vinschen + + * syscalls.cc (rename): Don't exit prematurely with EROFS when trying + to rename an AF_LOCAL socket or when trying to replace an AF_LOCAL + socket. + 2010-01-12 Corinna Vinschen * globals.cc (ro_u_nwfs): New R/O unicode string. diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 5cc59e682..ec589712a 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1765,7 +1765,7 @@ rename (const char *oldpath, const char *newpath) set_errno (ENOENT); goto out; } - if (oldpc.isspecial ()) /* No renames from virtual FS */ + if (oldpc.isspecial () && !oldpc.issocket ()) /* No renames from virtual FS */ { set_errno (EROFS); goto out; @@ -1814,7 +1814,7 @@ rename (const char *oldpath, const char *newpath) set_errno (newpc.error); goto out; } - if (newpc.isspecial ()) /* No renames to virtual FSes */ + if (newpc.isspecial () && !newpc.issocket ()) /* No renames to virtual FSes */ { set_errno (EROFS); goto out;