summaryrefslogtreecommitdiff
path: root/archivers/libarchive
diff options
context:
space:
mode:
authorryoon <ryoon>2014-07-18 10:42:50 +0000
committerryoon <ryoon>2014-07-18 10:42:50 +0000
commitd16575821d88f5973c49e0c7489cf39b283b6578 (patch)
treec4f55d463ab8d9ade72a5a3531d3565d00918802 /archivers/libarchive
parent99d0eccd79a933c02da3d5871c48d6b566dca5cb (diff)
downloadpkgsrc-d16575821d88f5973c49e0c7489cf39b283b6578.tar.gz
Fix SCO OpenServer 5.0.7/3.2 build.
Diffstat (limited to 'archivers/libarchive')
-rw-r--r--archivers/libarchive/files/libarchive/archive_platform.h10
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c3
2 files changed, 13 insertions, 0 deletions
diff --git a/archivers/libarchive/files/libarchive/archive_platform.h b/archivers/libarchive/files/libarchive/archive_platform.h
index ce2f482ba04..3f4ea2f9d3d 100644
--- a/archivers/libarchive/files/libarchive/archive_platform.h
+++ b/archivers/libarchive/files/libarchive/archive_platform.h
@@ -162,4 +162,14 @@
#define ARCHIVE_ERRNO_MISC (-1)
#endif
+/*
+ * SCO OpenServer 5.0.7/3.2 has no MAXPATHLEN, but it has PATH_MAX (256).
+ * in limits.h. But it is not usable under ordinal condition.
+ */
+#if !defined(PATH_MAX)
+#if defined(_SCO_DS)
+#define PATH_MAX 1024
+#endif
+#endif
+
#endif /* !ARCHIVE_PLATFORM_H_INCLUDED */
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
index 21d421e31a4..b44b4d4010e 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
@@ -625,9 +625,12 @@ parse_file(struct archive_read *a, struct archive_entry *entry,
if ((st->st_mode & S_IFMT) == S_IFLNK &&
archive_entry_filetype(entry) != AE_IFLNK)
mismatched_type = 1;
+/* SCO OpenServer 5.0.7/3.2 has no S_IFSOCK. */
+#if defined(S_IFSOCK)
if ((st->st_mode & S_IFSOCK) == S_IFSOCK &&
archive_entry_filetype(entry) != AE_IFSOCK)
mismatched_type = 1;
+#endif
if ((st->st_mode & S_IFMT) == S_IFCHR &&
archive_entry_filetype(entry) != AE_IFCHR)
mismatched_type = 1;