commit: 98da5a43c657ad65526b9f58ca990809cb9c49b8 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Tue Nov 10 18:15:01 2020 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Nov 10 19:20:07 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98da5a43
net-libs/http-parser: Backport non-x86 test fix Closes: https://bugs.gentoo.org/753887 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../files/http-parser-2.9.4-non-x86-test.patch | 20 ++++++++++++++++++++ net-libs/http-parser/http-parser-2.9.4.ebuild | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/net-libs/http-parser/files/http-parser-2.9.4-non-x86-test.patch b/net-libs/http-parser/files/http-parser-2.9.4-non-x86-test.patch new file mode 100644 index 00000000000..8bcbbf3589a --- /dev/null +++ b/net-libs/http-parser/files/http-parser-2.9.4-non-x86-test.patch @@ -0,0 +1,20 @@ +diff --git a/test.c b/test.c +index 53a3163..49c4b7a 100644 +--- a/test.c ++++ b/test.c +@@ -4343,7 +4343,13 @@ main (void) + printf("http_parser v%u.%u.%u (0x%06lx)\n", major, minor, patch, version); + + printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser)); +- assert(sizeof(http_parser) == 4 + 4 + 8 + 2 + 2 + 4 + sizeof(void *)); ++ ++#if defined(__i386__) || defined(__x86_64__) ++ /* Should be 32 on both 32 bits and 64 bits x86 because of struct padding, ++ * see https://github.com/nodejs/http-parser/issues/507. ++ */ ++ assert(sizeof(http_parser) == 24 + sizeof(void*)); ++#endif + + //// API + test_preserve_data(); + diff --git a/net-libs/http-parser/http-parser-2.9.4.ebuild b/net-libs/http-parser/http-parser-2.9.4.ebuild index c335060fa9a..01dcd50e086 100644 --- a/net-libs/http-parser/http-parser-2.9.4.ebuild +++ b/net-libs/http-parser/http-parser-2.9.4.ebuild @@ -12,6 +12,10 @@ LICENSE="MIT" SLOT="0/2.9.0" KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x64-macos ~x64-solaris" +PATCHES=( + "${FILESDIR}"/${P}-non-x86-test.patch +) + src_prepare() { default tc-export CC AR