unit3214: fix to pass on systems with >=128-bit pointers
No binary (build failed)
—
(log yok)
| @@ -26,6 +26,11 @@ | |
| static void checksize(const char *name, size_t size, size_t allowed) | |
| { | |
| + | /* Some platforms, e.g., CHERI, have 128-bit pointers. Allow structs to be |
| + | double the size of what we would typically expect. */ |
| + | if(sizeof(void *) > 8) |
| + | allowed *= sizeof(void *) / 8; |
| + | |
| if(size > allowed) { | |
| curl_mfprintf(stderr, "BAD: struct %s is %zu bytes, " | |
| "allowed to be %zu: %zu bytes too big\n", | |
| @@ -39,7 +44,8 @@ static void checksize(const char *name, size_t size, size_t allowed) | |
| } | |
| } | |
| - | /* the maximum sizes we allow specific structs to grow to */ |
| + | /* The maximum sizes we allow specific structs to grow to. |
| + | These sizes were chosen with platforms with 64-bit pointers in mind. */ |
| #define MAX_CURL_EASY 5370 | |
| #define MAX_CONNECTDATA 1300 | |
| #define MAX_CURL_MULTI 850 | |