From 508cf1cdc4ee5069688dcdf47bbf5c7034d0b0ff Mon Sep 17 00:00:00 2001 From: ryoon Date: Fri, 18 Jul 2014 10:42:50 +0000 Subject: Fix SCO OpenServer 5.0.7/3.2 build. --- archivers/libarchive/files/libarchive/archive_platform.h | 10 ++++++++++ .../files/libarchive/archive_read_support_format_mtree.c | 3 +++ 2 files changed, 13 insertions(+) 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; -- cgit v1.2.3