From 12a7e0f88eaa68aabe7e32589e2d5c8f776f6346 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 7 Sep 2016 17:04:49 -0700 Subject: Update from gnulib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This incorporates: 2016-09-07 flexmember: new macro FLEXALIGNOF 2016-09-07 flexmember: port better to GCC + valgrind 2016-08-18 Port modules to use getprogname explicitly 2016-09-02 manywarnings: add -fno-common * admin/merge-gnulib (GNULIB_TOOL_FLAGS): Don’t avoid flexmember, since time_rz now uses part of it. Instead, remove m4/flexmember.m4. * configure.ac (AC_C_FLEXIBLE_ARRAY_MEMBER): Define away, since Emacs assumes C99 and therefore removes m4/flexmember.m4. * lib/euidaccess.c, lib/group-member.c, lib/time_rz.c: * m4/manywarnings.m4: Copy from gnulib. * lib/flexmember.h: New file, from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. --- lib/time_rz.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/time_rz.c') diff --git a/lib/time_rz.c b/lib/time_rz.c index 55b764ea8b3..38afb5fc3cd 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c @@ -32,6 +32,7 @@ #include #include +#include "flexmember.h" #include "time-internal.h" #if !HAVE_TZSET @@ -94,7 +95,7 @@ tzalloc (char const *name) { size_t name_size = name ? strlen (name) + 1 : 0; size_t abbr_size = name_size < ABBR_SIZE_MIN ? ABBR_SIZE_MIN : name_size + 1; - timezone_t tz = malloc (offsetof (struct tm_zone, abbrs) + abbr_size); + timezone_t tz = malloc (FLEXSIZEOF (struct tm_zone, abbrs, abbr_size)); if (tz) { tz->next = NULL; -- cgit v1.2.3