aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-14 11:19:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-14 11:19:18 +0000
commitc5dcebebeda02f5b3830068d2a221fcc35159080 (patch)
tree5e86e7f6ac8258b53aaef567a416e7caac4fdd66 /file.c
parentaff8f3a462f69ab9ecc966ae9ddf5a570428a183 (diff)
downloadruby-c5dcebebeda02f5b3830068d2a221fcc35159080.tar.gz
exclude flexible array size with old compilers
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
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;