John Marino wrote:
After applying the recent patch to 8.31 ln to fix functionality on solaris 10, I saw some improvement but I think there's something else wrong.

e.g. # ln -s /raven/etc/fonts/conf.avail/50-user.conf .
ln: failed to create symbolic link '.': Invalid argument

Thanks. Could you please try the attached patch, which I installed on master?

Also, please try running 'make check'. It should catch bugs like this.
>From 3e0dff3925b5e521cae468087950e85b60002d1c Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Sun, 17 Mar 2019 13:20:42 -0700
Subject: [PATCH] ln: port to symlink ("x", ".") failing with EINVAL

Problem reported by John Marino (Bug#34894).
* src/ln.c (main): Port ln -s to Solaris symlink function,
where symlink ("x", ".") fails with errno == EINVAL.
---
 src/ln.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ln.c b/src/ln.c
index a5b012b39..646ca3d4d 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -603,7 +603,8 @@ main (int argc, char **argv)
     {
       if (n_files == 2 && !target_directory)
         link_errno = atomic_link (file[0], AT_FDCWD, file[1]);
-      if (link_errno < 0 || link_errno == EEXIST || link_errno == ENOTDIR)
+      if (link_errno < 0 || link_errno == EEXIST || link_errno == ENOTDIR
+	  || link_errno == EINVAL)
         {
           char const *d
             = target_directory ? target_directory : file[n_files - 1];
-- 
2.17.1

Reply via email to