libreplace: Fix the build on Solaris
authorVolker Lendecke <vl@samba.org>
Sat, 26 Sep 2015 22:57:50 +0000 (00:57 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 1 Oct 2015 00:55:21 +0000 (02:55 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib/replace/replace.c
lib/replace/wscript

index 798990a9abc82cf295858b44aadbbc5dedf05a04..c9c12a4ac9af3da5abd3a9e5c6b45411916d850f 100644 (file)
@@ -829,7 +829,7 @@ int rep_clock_gettime(clockid_t clk_id, struct timespec *tp)
        struct timeval tval;
        switch (clk_id) {
                case 0: /* CLOCK_REALTIME :*/
-#ifdef HAVE_GETTIMEOFDAY_TZ
+#if defined(HAVE_GETTIMEOFDAY_TZ) || defined(HAVE_GETTIMEOFDAY_TZ_VOID)
                        gettimeofday(&tval,NULL);
 #else
                        gettimeofday(&tval);
index 9a8b7f70503e95a97a126c22af9efd0ea252b5eb..0be52f7a431e6e0c9ca8c52f2428e263a0670714 100644 (file)
@@ -506,6 +506,11 @@ removeea setea
                            'int gettimeofday(struct timeval *tv, struct timezone *tz)',
                            define='HAVE_GETTIMEOFDAY_TZ', headers='sys/time.h')
 
+    conf.CHECK_C_PROTOTYPE('gettimeofday',
+                           'int gettimeofday(struct timeval *tv, void *tz)',
+                           define='HAVE_GETTIMEOFDAY_TZ_VOID',
+                           headers='sys/time.h')
+
     conf.CHECK_CODE('#include "test/snprintf.c"',
                     define="HAVE_C99_VSNPRINTF",
                     execute=True,