diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 778ad77daf9..6302a053875 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -132,8 +132,11 @@ linux_common_open(struct thread *td, int dirfd, char *path, int l_flags, int mod /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode); - if (error != 0) + if (error != 0) { + if (error == EMLINK) + error = ELOOP; goto done; + } if (bsd_flags & O_NOCTTY) goto done;