--- libarchive/archive_write_disk_posix.c.orig 2026-08-06 00:35:01.000000000 -0600 +++ libarchive/archive_write_disk_posix.c 2026-08-06 00:49:34.000000000 -0600 @@ -123,10 +123,16 @@ #if __APPLE__ #include +#include #if TARGET_OS_MAC && !TARGET_OS_EMBEDDED && HAVE_QUARANTINE_H #include #define HAVE_QUARANTINE 1 #endif +/* Mac OS X 10.4 does not have O_SYMLINK, but when HAVE_COPYFILE_H is defined it is +assumed it will have it. */ +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 +#undef HAVE_COPYFILE_H +#endif #endif #ifdef HAVE_ZLIB_H