diff options
Diffstat (limited to 'lib/libarchive')
5 files changed, 29 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_support_compression_all.c b/lib/libarchive/archive_read_support_compression_all.c index 9df6c4a..bd3a9b9 100644 --- a/lib/libarchive/archive_read_support_compression_all.c +++ b/lib/libarchive/archive_read_support_compression_all.c @@ -32,8 +32,13 @@ __FBSDID("$FreeBSD$"); int archive_read_support_compression_all(struct archive *a) { +#if HAVE_BZLIB_H archive_read_support_compression_bzip2(a); +#endif + /* The decompress code doesn't use an outside library. */ archive_read_support_compression_compress(a); +#if HAVE_ZLIB_H archive_read_support_compression_gzip(a); +#endif return (ARCHIVE_OK); } diff --git a/lib/libarchive/archive_read_support_compression_bzip2.c b/lib/libarchive/archive_read_support_compression_bzip2.c index 99acc62..e65d0ac 100644 --- a/lib/libarchive/archive_read_support_compression_bzip2.c +++ b/lib/libarchive/archive_read_support_compression_bzip2.c @@ -25,6 +25,10 @@ */ #include "archive_platform.h" + +/* Don't compile this if we don't have bzlib. */ +#if HAVE_BZLIB_H + __FBSDID("$FreeBSD$"); #include <err.h> @@ -361,3 +365,5 @@ fatal: a->compression_name); return (ARCHIVE_FATAL); } + +#endif /* HAVE_BZLIB_H */ diff --git a/lib/libarchive/archive_read_support_compression_gzip.c b/lib/libarchive/archive_read_support_compression_gzip.c index c7622a3..260e1d4 100644 --- a/lib/libarchive/archive_read_support_compression_gzip.c +++ b/lib/libarchive/archive_read_support_compression_gzip.c @@ -25,6 +25,10 @@ */ #include "archive_platform.h" + +/* Don't compile this if we don't have zlib. */ +#if HAVE_ZLIB_H + __FBSDID("$FreeBSD$"); #include <errno.h> @@ -496,3 +500,5 @@ fatal: a->compression_name); return (ARCHIVE_FATAL); } + +#endif /* HAVE_ZLIB_H */ diff --git a/lib/libarchive/archive_write_set_compression_bzip2.c b/lib/libarchive/archive_write_set_compression_bzip2.c index f044a0c..c7cee5e 100644 --- a/lib/libarchive/archive_write_set_compression_bzip2.c +++ b/lib/libarchive/archive_write_set_compression_bzip2.c @@ -25,6 +25,10 @@ */ #include "archive_platform.h" + +/* Don't compile this if we don't have bzlib. */ +#if HAVE_BZLIB_H + __FBSDID("$FreeBSD$"); #include <errno.h> @@ -326,3 +330,5 @@ drive_compressor(struct archive *a, struct private_data *state, int finishing) } } } + +#endif /* HAVE_BZLIB_H */ diff --git a/lib/libarchive/archive_write_set_compression_gzip.c b/lib/libarchive/archive_write_set_compression_gzip.c index 7b037ef..ca55410 100644 --- a/lib/libarchive/archive_write_set_compression_gzip.c +++ b/lib/libarchive/archive_write_set_compression_gzip.c @@ -25,6 +25,10 @@ */ #include "archive_platform.h" + +/* Don't compile this if we don't have zlib. */ +#if HAVE_ZLIB_H + __FBSDID("$FreeBSD$"); #include <errno.h> @@ -381,3 +385,5 @@ drive_compressor(struct archive *a, struct private_data *state, int finishing) } } } + +#endif /* HAVE_ZLIB_H */ |