summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_read_support_compression_bzip2.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2004-07-30 04:14:47 +0000
committerkientzle <kientzle@FreeBSD.org>2004-07-30 04:14:47 +0000
commit0a0da3ded81ae516e48317e0942d333dd78b0118 (patch)
treefddac2b611f177145ba5f5098c12c9e1408f153b /lib/libarchive/archive_read_support_compression_bzip2.c
parent0f5c53085722743d2438cb5277b3f4f47c75231a (diff)
downloadFreeBSD-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_read_support_compression_bzip2.c')
-rw-r--r--lib/libarchive/archive_read_support_compression_bzip2.c6
1 files changed, 6 insertions, 0 deletions
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 */
OpenPOWER on IntegriCloud