diff options
Diffstat (limited to 'lib/symlink.c')
-rw-r--r-- | lib/symlink.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/symlink.c b/lib/symlink.c index 427f1f5f00c..26310af7b12 100644 --- a/lib/symlink.c +++ b/lib/symlink.c @@ -1,17 +1,17 @@ /* Stub for symlink(). - Copyright (C) 2009-2017 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include <config.h> @@ -36,7 +36,7 @@ rpl_symlink (char const *contents, char const *name) if (len && name[len - 1] == '/') { struct stat st; - if (lstat (name, &st) == 0) + if (lstat (name, &st) == 0 || errno == EOVERFLOW) errno = EEXIST; return -1; } @@ -47,8 +47,8 @@ rpl_symlink (char const *contents, char const *name) /* The system does not support symlinks. */ int -symlink (char const *contents _GL_UNUSED, - char const *name _GL_UNUSED) +symlink (_GL_UNUSED char const *contents, + _GL_UNUSED char const *name) { errno = ENOSYS; return -1; |