tar: make FEATURE_TAR_AUTODETECT work with DESKTOP off too.
authorDenis Vlasenko <vda.linux@googlemail.com>
Fri, 13 Mar 2009 14:26:44 +0000 (14:26 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Fri, 13 Mar 2009 14:26:44 +0000 (14:26 -0000)
archival/libunarchive/get_header_tar.c

index 48fc23d8b057f19039e970ca2734981d30fda25e..0280bbc91d777fc88c599524bdff0c44a5850e19 100644 (file)
@@ -159,7 +159,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
 
  again_after_align:
 
-#if ENABLE_DESKTOP
+#if ENABLE_DESKTOP || ENABLE_FEATURE_TAR_AUTODETECT
        /* to prevent misdetection of bz2 sig */
        *(uint32_t*)(&tar) = 0;
        i = full_read(archive_handle->src_fd, &tar, 512);
@@ -210,7 +210,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
 #if ENABLE_FEATURE_TAR_AUTODETECT
                char FAST_FUNC (*get_header_ptr)(archive_handle_t *);
 
- USE_DESKTOP(autodetect:)
+ autodetect:
                /* tar gz/bz autodetect: check for gz/bz2 magic.
                 * If we see the magic, and it is the very first block,
                 * we can switch to get_header_tar_gz/bz2/lzma().