pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/libarchive/files/tar On Linux systems, don't...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2c552bad8061
branches:  trunk
changeset: 547657:2c552bad8061
user:      dsainty <dsainty%pkgsrc.org@localhost>
date:      Wed Sep 24 13:53:13 2008 +0000

description:
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:

 archivers/libarchive/files/tar/write.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r a94b0f06f7ae -r 2c552bad8061 archivers/libarchive/files/tar/write.c
--- a/archivers/libarchive/files/tar/write.c    Wed Sep 24 11:40:53 2008 +0000
+++ b/archivers/libarchive/files/tar/write.c    Wed Sep 24 13:53:13 2008 +0000
@@ -648,7 +648,7 @@
        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 @@
                        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 @@
 {
        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 @@
                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 &&



Home | Main Index | Thread Index | Old Index