summaryrefslogtreecommitdiff
path: root/lib/time_rz.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-02-15 21:41:24 +0100
committerAndy Wingo <wingo@pobox.com>2017-02-15 21:41:24 +0100
commit7e641595cd9b45ce7339e21c20a8ab81af9278f6 (patch)
tree8d224f14ad2cb5dc18a8375197c651e4563ec0cd /lib/time_rz.c
parent69ca2bb2217303b2556b131f3995ca4f6af81234 (diff)
downloadguile-7e641595cd9b45ce7339e21c20a8ab81af9278f6.tar.gz
Update Gnulib to v0.1-1157-gb03f418.
Diffstat (limited to 'lib/time_rz.c')
-rw-r--r--lib/time_rz.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/time_rz.c b/lib/time_rz.c
index 612093bbc..c6e6083a6 100644
--- a/lib/time_rz.c
+++ b/lib/time_rz.c
@@ -1,6 +1,6 @@
/* Time zone functions such as tzalloc and localtime_rz
- Copyright 2015-2016 Free Software Foundation, Inc.
+ Copyright 2015-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <string.h>
+#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;