diff options
Diffstat (limited to 'lib/libarchive/archive_platform.h')
-rw-r--r-- | lib/libarchive/archive_platform.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libarchive/archive_platform.h b/lib/libarchive/archive_platform.h index 770d8082c23c..4140df28e938 100644 --- a/lib/libarchive/archive_platform.h +++ b/lib/libarchive/archive_platform.h @@ -46,6 +46,8 @@ #if __FreeBSD__ > 4 #define HAVE_ACL_CREATE_ENTRY 1 #define HAVE_ACL_INIT 1 +#define HAVE_ACL_SET_FD 1 +#define HAVE_ACL_SET_FD_NP 1 #define HAVE_ACL_SET_FILE 1 #endif #define HAVE_BZLIB_H 1 @@ -55,7 +57,10 @@ #define HAVE_EILSEQ 1 #define HAVE_ERRNO_H 1 #define HAVE_FCHDIR 1 +#define HAVE_FCHMOD 1 +#define HAVE_FCHOWN 1 #define HAVE_FCNTL_H 1 +#define HAVE_FUTIMES 1 #define HAVE_INTTYPES_H 1 #define HAVE_LCHMOD 1 #define HAVE_LCHOWN 1 @@ -123,6 +128,14 @@ #define HAVE_POSIX_ACL 1 #endif +/* + * If we can't restore metadata using a file descriptor, then + * for compatibility's sake, close files before trying to restore metadata. + */ +#if defined(HAVE_FCHMOD) || defined(HAVE_FUTIMES) || defined(HAVE_ACL_SET_FD) || defined(HAVE_ACL_SET_FD_NP) || defined(HAVE_FCHOWN) +#define CAN_RESTORE_METADATA_FD +#endif + /* Set up defaults for internal error codes. */ #ifndef ARCHIVE_ERRNO_FILE_FORMAT #if HAVE_EFTYPE |