Toomas Soome
2021-04-24 f867e7d65c2a4401c53bbac25e0540acc39e8067
http-parser: assert in test is wrong on 32-bit sparc

1 files added
1 files modified
14 ■■■■■ changed files
components/library/http-parser/Makefile 1 ●●●● patch | view | raw | blame | history
components/library/http-parser/patches/02-test.patch 13 ●●●●● patch | view | raw | blame | history
components/library/http-parser/Makefile
@@ -20,6 +20,7 @@
COMPONENT_NAME=        http-parser
COMPONENT_VERSION=    2.9.4
COMPONENT_REVISION=    2
COMPONENT_FMRI=        library/http-parser
COMPONENT_CLASSIFICATION=System/Libraries
COMPONENT_PROJECT_URL=    https://github.com/nodejs/http-parser
components/library/http-parser/patches/02-test.patch
New file
@@ -0,0 +1,13 @@
--- http-parser-2.9.4/test.c.orig       ::
+++ http-parser-2.9.4/test.c       ::
@@ -4221,7 +4221,9 @@
   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 *));
+  //// On sparcv7, the field alignment/padding will result http_parser
+  //// to be 32 bytes, yet pointer size is still 32-bit.
+  //// assert(sizeof(http_parser) == 4 + 4 + 8 + 2 + 2 + 4 + sizeof(void *));
   //// API
   test_preserve_data();