From: Bruno Haible Date: Sun, 9 Aug 2009 07:15:28 +0000 (+0200) Subject: Avoid compilation error in C++ mode. X-Git-Tag: v0.1~5692 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=47aaecc85cb2a374c6c3d6945dbf3d18df065838;p=gnulib.git Avoid compilation error in C++ mode. --- diff --git a/ChangeLog b/ChangeLog index e3e562fb5..b8b59608f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-08-08 Bruno Haible + Avoid compilation error in C++ mode. + * lib/gettimeofday.c (rpl_gettimeofday): Cast timezone argument. + Reported by Sam Steingold . + +2009-08-08 Bruno Haible + * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Define HOST_NAME_MAX also for the various Unix platforms. * doc/posix-headers/limits.texi: Update platforms list regarding diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index 7e711f790..1cf752af8 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -1,6 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software + Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -111,7 +111,7 @@ rpl_gettimeofday (struct timeval *restrict tv, void *restrict tz) struct tm save = *localtime_buffer_addr; # endif - int result = gettimeofday (tv, tz); + int result = gettimeofday (tv, (struct timezone *) tz); # if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save;