On 2016-10-21 Lucas Nussbaum <lu...@debian.org> wrote: > Source: libcdio > Version: 0.83-4.2 > Severity: serious > Tags: stretch sid > User: debian...@lists.debian.org > Usertags: qa-ftbfs-20161021 qa-ftbfs > Justification: FTBFS on amd64
> Hi, > During a rebuild of all packages in sid, your package failed to build on > amd64. [...] This seems to be fixed in experimental's 0.92. Afaict this was fixed in http://git.savannah.gnu.org/gitweb/?p=libcdio.git;a=commitdiff;h=0bdb015d47b95abaa79fc2b83ffacdd63429a992 with diff --git a/include/cdio/iso9660.h b/include/cdio/iso9660.h index 45ece74..942c52d 100644 (file) --- a/include/cdio/iso9660.h +++ b/include/cdio/iso9660.h @@ -60,7 +60,7 @@ typedef uint64_t iso733_t; /*! See section 7.3.3 */ typedef char achar_t; /*! See section 7.4.1 */ typedef char dchar_t; /*! See section 7.4.1 */ -#ifndef EMPTY_ARRAY_SIZE +#ifndef EMPTY_ARRAY_SIZE #define EMPTY_ARRAY_SIZE 0 #endif @@ -273,8 +273,18 @@ struct iso9660_dir_s { the Extent described by this Directory Record is recorded. (9.1.9) */ - iso711_t filename_len; /*! number of bytes in filename field */ - char filename[EMPTY_ARRAY_SIZE]; +/*! MSVC compilers cannot handle a zero sized array in the middle + of a struct, and iso9660_dir_s is reused within iso9660_pvd_s. + Therefore, instead of defining: + iso711_t filename_len; + char filename[]; + we leverage the fact that iso711_t and char are the same size + and use an union. The only gotcha is that the actual string + payload of filename.str[] starts at 1, not 0. */ + union { + iso711_t len; + char str[1]; + } filename; } GNUC_PACKED; /*! and the related changes. cu Andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure'