libarchive: fix build failure on NOMMU systems
authorRon Yorston <rmy@pobox.com>
Tue, 22 Aug 2017 10:34:03 +0000 (11:34 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 22 Aug 2017 13:41:33 +0000 (15:41 +0200)
In the old code fd was an argument, now we need to get the file descriptor
from the xstate structure.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/libarchive/open_transformer.c

index 290dd130f9f896ac3dff73efdbd4201996dd33df..e81a81072f69cd3056ade21754ff0c6f5cf6b8ad 100644 (file)
@@ -234,7 +234,7 @@ static void fork_transformer_and_free(transformer_state_t *xstate)
         * an external unzipper that wants
         * file position at the start of the file.
         */
-       xlseek(fd, - xstate->signature_skipped, SEEK_CUR);
+       xlseek(xstate->src_fd, - xstate->signature_skipped, SEEK_CUR);
        xstate->signature_skipped = 0;
        fork_transformer_with_sig(xstate->src_fd, xstate->xformer, xstate->xformer_prog);
 # endif