21 lines
645 B
Diff
21 lines
645 B
Diff
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();
|
|
|