replace: Fix check for gettimeofday()
authorAndreas Schneider <asn@samba.org>
Wed, 9 Sep 2015 11:47:42 +0000 (13:47 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 9 Sep 2015 22:36:16 +0000 (00:36 +0200)
The check does not include <sys/time.h> the test might fail with a
implicit function declaration error.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 10 00:36:16 CEST 2015 on sn-devel-104

lib/replace/wscript

index 30eede2a8db4d756aa5f391738926e24bed22dab..9a8b7f70503e95a97a126c22af9efd0ea252b5eb 100644 (file)
@@ -502,7 +502,9 @@ removeea setea
                        addmain=False,
                        msg='Checking for working strptime')
 
-    conf.CHECK_CODE('gettimeofday(NULL, NULL)', 'HAVE_GETTIMEOFDAY_TZ', execute=False)
+    conf.CHECK_C_PROTOTYPE('gettimeofday',
+                           'int gettimeofday(struct timeval *tv, struct timezone *tz)',
+                           define='HAVE_GETTIMEOFDAY_TZ', headers='sys/time.h')
 
     conf.CHECK_CODE('#include "test/snprintf.c"',
                     define="HAVE_C99_VSNPRINTF",