$OpenBSD: patch-libarchive_test_test_write_format_gnutar_filenames_c,v 1.1 2016/06/23 20:19:36 naddy Exp $

Avoid use of C99 for-scope declarations.
https://github.com/libarchive/libarchive/commit/11f5b75

--- libarchive/test/test_write_format_gnutar_filenames.c.orig	Mon Jun 20 01:09:33 2016
+++ libarchive/test/test_write_format_gnutar_filenames.c	Thu Jun 23 21:41:27 2016
@@ -42,6 +42,7 @@ DEFINE_TEST(test_write_format_gnutar_filenames)
 	struct archive_entry *ae, *template;
 	struct archive *a;
 	size_t used;
+	int i;
 
 	buff = malloc(buffsize); /* million bytes of work area */
 	assert(buff != NULL);
@@ -55,7 +56,7 @@ DEFINE_TEST(test_write_format_gnutar_filenames)
 	archive_entry_set_mode(template, S_IFREG | 0755);
 	archive_entry_set_size(template, 8);
 
-	for (int i = 0; i < 2000; ++i) {
+	for (i = 0; i < 2000; ++i) {
 		filename[i] = 'a';
 		filename[i + 1] = '\0';
 		archive_entry_copy_pathname(template, filename);
@@ -97,6 +98,7 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
 	struct archive_entry *ae, *template;
 	struct archive *a;
 	size_t used;
+	int i;
 
 	buff = malloc(buffsize); /* million bytes of work area */
 	assert(buff != NULL);
@@ -110,7 +112,7 @@ DEFINE_TEST(test_write_format_gnutar_linknames)
 	archive_entry_set_mode(template, S_IFLNK | 0755);
 	archive_entry_copy_pathname(template, "link");
 
-	for (int i = 0; i < 2000; ++i) {
+	for (i = 0; i < 2000; ++i) {
 		filename[i] = 'a';
 		filename[i + 1] = '\0';
 		archive_entry_copy_symlink(template, filename);
