From: Andres Mejia Date: Sat, 26 Jan 2013 03:43:17 +0000 (-0500) Subject: Fix build failure when doing normal builds. X-Git-Tag: v3.1.2~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b10f04c5c7930d0e68641677edeca3392518e16;p=thirdparty%2Flibarchive.git Fix build failure when doing normal builds. These are builds done running a standard './configure && make'. This will also fix a corner case where the whence is set to anything other than SEEK_SET, SEEK_CUR, or SEEK_END. The behavior is to use SEEK_SET by default. --- diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c index 632908ea1..54f2f5f28 100644 --- a/libarchive/archive_read_support_format_rar.c +++ b/libarchive/archive_read_support_format_rar.c @@ -1026,14 +1026,15 @@ archive_read_format_rar_seek_data(struct archive_read *a, int64_t offset, /* Modify the offset for use with SEEK_SET */ switch (whence) { - case SEEK_SET: - client_offset = 0; - break; case SEEK_CUR: client_offset = rar->offset_seek; break; case SEEK_END: client_offset = rar->unp_size; + break; + case SEEK_SET: + default: + client_offset = 0; } client_offset += offset; if (client_offset < 0)