From c5dcebebeda02f5b3830068d2a221fcc35159080 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 14 Jan 2018 11:19:18 +0000 Subject: exclude flexible array size with old compilers git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.c') diff --git a/file.c b/file.c index 5947b3f68b..7fdca684cc 100644 --- a/file.c +++ b/file.c @@ -388,7 +388,7 @@ apply2files(int (*func)(const char *, void *), int argc, VALUE *argv, void *arg) { VALUE v; const size_t size = sizeof(struct apply_filename); - const long len = (long)(sizeof(struct apply_arg) + (size * argc)); + const long len = (long)(offsetof(struct apply_arg, fn) + (size * argc)); struct apply_arg *aa = ALLOCV(v, len); aa->errnum = 0; -- cgit v1.2.3