diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-05-05 07:00:27 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-05-05 07:00:27 -0400 |
commit | 4f239b1bb429408bef5688384aa91ea4fa9bd76e (patch) | |
tree | b64bdd65b229e4ff730685653e9e05120f3ae643 | |
parent | 76f5e38c8228664680d915873186d891e64a3c0a (diff) | |
download | busybox-w32-4f239b1bb429408bef5688384aa91ea4fa9bd76e.tar.gz busybox-w32-4f239b1bb429408bef5688384aa91ea4fa9bd76e.tar.bz2 busybox-w32-4f239b1bb429408bef5688384aa91ea4fa9bd76e.zip |
libunarchive: fix build failure with !FEATURE_TAR_UNAME_GNAME
We can't use C if(...) with ENABLE_FEATURE_TAR_UNAME_GNAME because it
relies on conditional members in the file_header_t structure:
archival/libunarchive/data_extract_all.c: In function ‘data_extract_all’:
archival/libunarchive/data_extract_all.c:123: error: ‘file_header_t’ has no member named ‘uname’
archival/libunarchive/data_extract_all.c:124: error: ‘file_header_t’ has no member named ‘uname’
archival/libunarchive/data_extract_all.c:127: error: ‘file_header_t’ has no member named ‘gname’
archival/libunarchive/data_extract_all.c:128: error: ‘file_header_t’ has no member named ‘gname’
make[1]: *** [archival/libunarchive/data_extract_all.o] Error 1
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | archival/libunarchive/data_extract_all.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index a2dfcb9e1..444770d27 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c | |||
@@ -114,9 +114,8 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) | |||
114 | } | 114 | } |
115 | 115 | ||
116 | if (!(archive_handle->ah_flags & ARCHIVE_NOPRESERVE_OWN)) { | 116 | if (!(archive_handle->ah_flags & ARCHIVE_NOPRESERVE_OWN)) { |
117 | if (ENABLE_FEATURE_TAR_UNAME_GNAME | 117 | #if ENABLE_FEATURE_TAR_UNAME_GNAME |
118 | && !(archive_handle->ah_flags & ARCHIVE_NUMERIC_OWNER) | 118 | if (!(archive_handle->ah_flags & ARCHIVE_NUMERIC_OWNER)) { |
119 | ) { | ||
120 | uid_t uid = file_header->uid; | 119 | uid_t uid = file_header->uid; |
121 | gid_t gid = file_header->gid; | 120 | gid_t gid = file_header->gid; |
122 | 121 | ||
@@ -129,9 +128,9 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) | |||
129 | if (grp) gid = grp->gr_gid; | 128 | if (grp) gid = grp->gr_gid; |
130 | } | 129 | } |
131 | lchown(file_header->name, uid, gid); | 130 | lchown(file_header->name, uid, gid); |
132 | } else { | 131 | } else |
132 | #endif | ||
133 | lchown(file_header->name, file_header->uid, file_header->gid); | 133 | lchown(file_header->name, file_header->uid, file_header->gid); |
134 | } | ||
135 | } | 134 | } |
136 | if ((file_header->mode & S_IFMT) != S_IFLNK) { | 135 | if ((file_header->mode & S_IFMT) != S_IFLNK) { |
137 | /* uclibc has no lchmod, glibc is even stranger - | 136 | /* uclibc has no lchmod, glibc is even stranger - |