less: document -S flag and make it independently configurable
[oweals/busybox.git] / archival / libarchive / get_header_cpio.c
index 3d99b492ab1da17026de74597a4747f0acf5d2fb..7861d1f6f146d1e39dd3653f9387e97d0ddcd49d 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #include "libbb.h"
-#include "archive.h"
+#include "bb_archive.h"
 
 typedef struct hardlinks_t {
        struct hardlinks_t *next;
@@ -37,7 +37,7 @@ char FAST_FUNC get_header_cpio(archive_handle_t *archive_handle)
        }
        archive_handle->offset += 110;
 
-       if (strncmp(&cpio_header[0], "07070", 5) != 0
+       if (!is_prefixed_with(&cpio_header[0], "07070")
         || (cpio_header[5] != '1' && cpio_header[5] != '2')
        ) {
                bb_error_msg_and_die("unsupported cpio format, use newc or crc");