From: Paul Eggert Date: Thu, 25 Nov 2010 07:07:46 +0000 (-0800) Subject: tar: work around NetBSD and Tru64 symlink incompatibility with POSIX X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=649b747913d2b289e904b5f1d222af886acd209c;p=chaz%2Ftar tar: work around NetBSD and Tru64 symlink incompatibility with POSIX Problem reported by Bruno Haible in . * src/extract.c (maybe_recoverable): Also treat EFTYPE (if defined) and ENOTSUP like ELOOP. --- diff --git a/src/extract.c b/src/extract.c index c52c9ce..aaea56e 100644 --- a/src/extract.c +++ b/src/extract.c @@ -609,9 +609,18 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made) switch (e) { case ELOOP: + /* With open ("symlink", O_NOFOLLOW|...), POSIX says errno == ELOOP, - but FreeBSD through at least 8.1 uses errno == EMLINK. */ + but some operating systems do not conform to the standard. */ +#ifdef EFTYPE + /* NetBSD uses errno == EFTYPE; see . */ + case EFTYPE: +#endif + /* FreeBSD 8.1 uses errno == EMLINK. */ case EMLINK: + /* Tru64 5.1B uses errno == ENOTSUP. */ + case ENOTSUP: + if (! regular || old_files_option != OVERWRITE_OLD_FILES || dereference_option) break;