Avoid compilation error in C++ mode.
authorBruno Haible <bruno@clisp.org>
Sun, 9 Aug 2009 07:15:28 +0000 (09:15 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Aug 2009 07:15:28 +0000 (09:15 +0200)
ChangeLog
lib/gettimeofday.c

index e3e562fb5375bcbc1e4946d45210dc74d91a9f2e..b8b59608f4685eadacbfcc9a329f58a842f7d2e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-08  Bruno Haible  <bruno@clisp.org>
+
+       Avoid compilation error in C++ mode.
+       * lib/gettimeofday.c (rpl_gettimeofday): Cast timezone argument.
+       Reported by Sam Steingold <sds@gnu.org>.
+
 2009-08-08  Bruno Haible  <bruno@clisp.org>
 
        * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Define HOST_NAME_MAX also
index 7e711f790dd3537c90b7d1879fcb7a924abfe531..1cf752af8b4e97300e9d43499d76c33a748919a2 100644 (file)
@@ -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;