From 0ef7a9d7d22c9a7779def3f8c7f0166d996a2401 Mon Sep 17 00:00:00 2001 From: xtkoba <69125751+xtkoba@users.noreply.github.com> Date: Wed, 29 Sep 2021 19:24:44 +0900 Subject: [PATCH] Keep `LONGDOUBLE_ADJ >= sizeof(long double)` --- ext/ffi_c/Call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ffi_c/Call.c b/ext/ffi_c/Call.c index 86ce3b9a3..bd6c2776b 100644 --- a/ext/ffi_c/Call.c +++ b/ext/ffi_c/Call.c @@ -71,7 +71,7 @@ #define FLOAT32_ADJ (4) #define FLOAT64_ADJ (8) #define ADDRESS_ADJ (sizeof(void *)) -#define LONGDOUBLE_ADJ (ffi_type_longdouble.alignment) +#define LONGDOUBLE_ADJ (ffi_type_longdouble.alignment > sizeof(long double) ? ffi_type_longdouble.alignment : sizeof(long double)) #endif /* USE_RAW */