From: Brad King Date: Thu, 26 Sep 2013 12:58:24 +0000 (-0400) Subject: Avoid struct init with variable X-Git-Tag: v3.1.900a~363 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14fa5039e8f62a35c7113fc66e8822af4299f1a2;p=thirdparty%2Flibarchive.git Avoid struct init with variable Compilers such as Borland and MIPSpro do not like struct initialization with variables. Initialize using assignment instead. --- diff --git a/libarchive/archive_read_open_filename.c b/libarchive/archive_read_open_filename.c index fefcd904d..622c960c4 100644 --- a/libarchive/archive_read_open_filename.c +++ b/libarchive/archive_read_open_filename.c @@ -103,7 +103,9 @@ int archive_read_open_filename(struct archive *a, const char *filename, size_t block_size) { - const char *filenames[2] = { filename, NULL }; + const char *filenames[2]; + filenames[0] = filename; + filenames[1] = NULL; return archive_read_open_filenames(a, filenames, block_size); }