[Privoxy-commits] [privoxy] 02/04: configure.in: Fix argument types in gmtime_r() and localtime_r() probes

User Git git at git.privoxy.org
Tue Dec 19 11:53:13 CET 2023


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit a194c809ba452046cdefec7753c500041389e518
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Dec 19 11:48:37 2023 +0100

    configure.in: Fix argument types in gmtime_r() and localtime_r() probes
    
    Otherwise these probes always fail with stricter compilers
    even if there is C library support for these functions.
    
    Patch submitted by Florian Weimer in SF#149.
---
 configure.in | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.in b/configure.in
index f8a23a52..95141ec8 100644
--- a/configure.in
+++ b/configure.in
@@ -615,9 +615,9 @@ AC_CHECK_FUNC(gmtime_r, [
   AC_TRY_COMPILE([
 #   include <time.h>
   ], [
-    struct time *t;
-    struct tm *tm;
-    (void) gmtime_r(t, tm)
+    time_t t;
+    struct tm tm;
+    (void) gmtime_r(&t, &tm)
   ], [
     AC_MSG_RESULT(ok)
     AC_DEFINE(HAVE_GMTIME_R)
@@ -633,9 +633,9 @@ AC_CHECK_FUNC(localtime_r, [
   AC_TRY_COMPILE([
 #   include <time.h>
   ], [
-    struct time *t;
-    struct tm *tm;
-    (void) localtime_r(t, tm)
+    time_t t;
+    struct tm tm;
+    (void) localtime_r(&t, &tm)
   ], [
     AC_MSG_RESULT(ok)
     AC_DEFINE(HAVE_LOCALTIME_R)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list