aboutsummaryrefslogtreecommitdiff
path: root/src/xz/io.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-11-20 22:59:10 +0200
committerLasse Collin <lasse.collin@tukaani.org>2008-11-20 22:59:10 +0200
commit6d1d6f4598d121253dbe1084c6866b66e95c361b (patch)
tree0214265f40ad01955fc257c1fe57b0e1ade5dba2 /src/xz/io.c
parentBuild xzdec and lzmadec from xzdec.c. xzdec supports only .xz (diff)
downloadxz-6d1d6f4598d121253dbe1084c6866b66e95c361b.tar.xz
Support NetBSD's errno for O_NOFOLLOW.
Diffstat (limited to '')
-rw-r--r--src/xz/io.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xz/io.c b/src/xz/io.c
index 0ec63f03..49d3d8bc 100644
--- a/src/xz/io.c
+++ b/src/xz/io.c
@@ -300,6 +300,14 @@ io_open_src(file_pair *pair)
if (errno == ENOTSUP)
was_symlink = true;
+# elif defined(__NetBSD__)
+ // FIXME? As of 2008-11-20, NetBSD doesn't document what
+ // errno is used with O_NOFOLLOW. It seems to be EFTYPE,
+ // but since it isn't documented, it may be wrong to rely
+ // on it here.
+ if (errno == EFTYPE)
+ was_symlink = true;
+
# else
if (errno == ELOOP && reg_files_only) {
const int saved_errno = errno;