aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libunarchive/get_header_cpio.c')
-rw-r--r--archival/libunarchive/get_header_cpio.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/archival/libunarchive/get_header_cpio.c b/archival/libunarchive/get_header_cpio.c
index 4ed18c68f..96be4b5ac 100644
--- a/archival/libunarchive/get_header_cpio.c
+++ b/archival/libunarchive/get_header_cpio.c
@@ -19,9 +19,6 @@ typedef struct hardlinks_s {
char FAST_FUNC get_header_cpio(archive_handle_t *archive_handle)
{
- static hardlinks_t *saved_hardlinks = NULL;
- static hardlinks_t *saved_hardlinks_created = NULL;
-
file_header_t *file_header = archive_handle->file_header;
char cpio_header[110];
char dummy[16];
@@ -29,6 +26,14 @@ char FAST_FUNC get_header_cpio(archive_handle_t *archive_handle)
int major, minor, nlink, mode, inode;
unsigned size, uid, gid, mtime;
+#define saved_hardlinks (*(hardlinks_t **)(&archive_handle->ah_priv[0]))
+#define saved_hardlinks_created (*(hardlinks_t **)(&archive_handle->ah_priv[1]))
+// if (!archive_handle->ah_priv_inited) {
+// archive_handle->ah_priv_inited = 1;
+// saved_hardlinks = NULL;
+// saved_hardlinks_created = NULL;
+// }
+
/* There can be padding before archive header */
data_align(archive_handle, 4);