else
a->todo |= TODO_MAC_METADATA;
}
-#if defined(__APPLE__) && defined(UF_COMPRESSED)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_ZLIB_H)
if ((a->flags & ARCHIVE_EXTRACT_NO_HFS_COMPRESSION) == 0) {
unsigned long set, clear;
archive_entry_fflags(a->entry, &set, &clear);
ret = restore_entry(a);
-#if defined(__APPLE__) && defined(UF_COMPRESSED)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_ZLIB_H)
/*
* Check if the filesystem the file is restoring on supports
* HFS+ Compression. If not, cancel HFS+ Compression.
return (start_size - size);
}
-#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)\
+ && defined(HAVE_ZLIB_H)
/*
* Set UF_COMPRESSED file flag.
} else if (a->fd_offset == a->filesize) {
/* Last write ended at exactly the filesize; we're done. */
/* Hopefully, this is the common case. */
-#if defined(__APPLE__) && defined(UF_COMPRESSED)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_ZLIB_H)
} else if (a->todo & TODO_HFS_COMPRESSION) {
char null_d[1024];
ssize_t r;
#include <sys/xattr.h>
#endif
-#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)\
+ && defined(HAVE_ZLIB_H)
static int
has_xattr(const char *filename, const char *xattrname)
{
*/
DEFINE_TEST(test_write_disk_appledouble)
{
-#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)
+#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)\
+ || !defined(HAVE_ZLIB_H)
skipping("MacOS-specific AppleDouble test");
#else
const char *refname = "test_write_disk_appledouble.cpio.gz";
#include <sys/xattr.h>
#endif
-#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)\
+ && defined(HAVE_ZLIB_H)
static int
has_xattr(const char *filename, const char *xattrname)
{
*/
DEFINE_TEST(test_write_disk_hfs_compression)
{
-#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)
+#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)\
+ || !defined(HAVE_ZLIB_H)
skipping("MacOS-specific HFS+ Compression test");
#else
const char *refname = "test_write_disk_hfs_compression.tgz";
#include <sys/xattr.h>
#endif
-#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)\
+ && defined(HAVE_ZLIB_H)
static int
has_xattr(const char *filename, const char *xattrname)
{
*/
DEFINE_TEST(test_write_disk_mac_metadata)
{
-#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)
+#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)\
+ || !defined(HAVE_ZLIB_H)
skipping("MacOS-specific Mac Metadata test");
#else
const char *refname = "test_write_disk_mac_metadata.tar.gz";
#include <sys/xattr.h>
#endif
-#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)
+#if defined(__APPLE__) && defined(UF_COMPRESSED) && defined(HAVE_SYS_XATTR_H)\
+ && defined(HAVE_ZLIB_H)
static int
has_xattr(const char *filename, const char *xattrname)
{
*/
DEFINE_TEST(test_write_disk_no_hfs_compression)
{
-#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)
+#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)\
+ || !defined(HAVE_ZLIB_H)
skipping("MacOS-specific HFS+ Compression test");
#else
const char *refname = "test_write_disk_no_hfs_compression.tgz";