diff options
author | dsainty <dsainty@pkgsrc.org> | 2008-09-24 13:53:13 +0000 |
---|---|---|
committer | dsainty <dsainty@pkgsrc.org> | 2008-09-24 13:53:13 +0000 |
commit | 95db845e8d16805314b6772cb556c80484478960 (patch) | |
tree | 1eb100c69551e187435dfc01f929414b01b986e7 /archivers/libarchive | |
parent | dc4f7319c7485a25d20dcbe5c29b52191fe2bf7a (diff) | |
download | pkgsrc-95db845e8d16805314b6772cb556c80484478960.tar.gz |
On Linux systems, don't use ext2_fs.h features if we don't have the header.
Fixes build of pkgsrc/archivers/bsdtar on some systems, no functional change
intended on systems that already successfully built.
Ok'd during freeze by joerg@ and agc@
Diffstat (limited to 'archivers/libarchive')
-rw-r--r-- | archivers/libarchive/files/tar/write.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archivers/libarchive/files/tar/write.c b/archivers/libarchive/files/tar/write.c index 1a6e9289abe..3d4fd186b99 100644 --- a/archivers/libarchive/files/tar/write.c +++ b/archivers/libarchive/files/tar/write.c @@ -648,7 +648,7 @@ write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path) dev_t first_dev = 0; int dev_recorded = 0; int tree_ret; -#ifdef __linux +#ifdef HAVE_EXT2FS_EXT2_FS_H int fd, r; unsigned long fflags; #endif @@ -720,7 +720,7 @@ write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path) continue; #endif -#ifdef __linux +#ifdef HAVE_EXT2FS_EXT2_FS_H /* * Linux has a nodump flag too but to read it * we have to open() the file/dir and do an ioctl on it... @@ -850,7 +850,7 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, const struct stat *st, { struct archive_entry *entry, *sparse_entry; int fd; -#ifdef __linux +#ifdef HAVE_EXT2FS_EXT2_FS_H int r; unsigned long stflags; #endif @@ -909,7 +909,7 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, const struct stat *st, archive_entry_set_fflags(entry, st->st_flags, 0); #endif -#ifdef __linux +#ifdef HAVE_EXT2FS_EXT2_FS_H if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode)) && ((fd = open(accpath, O_RDONLY|O_NONBLOCK)) >= 0) && ((r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags)), close(fd), (fd = -1), r) >= 0 && |