diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-07-30 04:14:47 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-07-30 04:14:47 +0000 |
commit | 0a0da3ded81ae516e48317e0942d333dd78b0118 (patch) | |
tree | fddac2b611f177145ba5f5098c12c9e1408f153b /lib/libarchive/archive_write_set_compression_gzip.c | |
parent | 0f5c53085722743d2438cb5277b3f4f47c75231a (diff) | |
download | FreeBSD-src-0a0da3ded81ae516e48317e0942d333dd78b0118.zip FreeBSD-src-0a0da3ded81ae516e48317e0942d333dd78b0118.tar.gz |
Conditionalize the bzip2/gzip compression/decompression
code on the existence of the relevant libraries (actually,
the existence of the include files).
This will allow the library to be easily ported to systems
that don't have these libraries. (Of course, it also means
that clients using the library on such systems will not be
able to take advantage of the automatic compression format
detection.)
Diffstat (limited to 'lib/libarchive/archive_write_set_compression_gzip.c')
-rw-r--r-- | lib/libarchive/archive_write_set_compression_gzip.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |