[PATCH] allow cross-compiling samba-2.2.7

Dan Kegel dank at kegel.com
Sat Dec 14 01:48:00 GMT 2002

Gerald (Jerry) Carter wrote:
> Dan,
> Please send me the patch and I'll work on getting it in. 
> On Fri, 6 Dec 2002, Dan Kegel wrote:
>>Here's the only use of HAVE_GETTIMEOFDAY_TZ:
>>void GetTimeOfDay(struct timeval *tval)
>>     gettimeofday(tval,NULL);
>>     gettimeofday(tval);
>>Thus all it's trying to do is tell whether the 2nd parameter
>>has to be there.  You can do that without a runtime check --
>>unless you're trying to be sneaky and optimize away one
>>parameter for performance reasons.
>>If the group feels that there's an important performance reason
>>to avoid that 2nd parameter, then sure, I can submit another
>>patch that keeps the current "skip the 2nd parameter if it
>>didn't crash the first time we called it with only 1 parameter" behavior.

Thanks, looking forward to hearing what you think about the patch.
Patch attached.
- Dan

-------------- next part --------------
--- samba-2.2.7/source/configure.in.orig	Thu Dec  5 12:09:07 2002
+++ samba-2.2.7/source/configure.in	Thu Dec  5 12:18:52 2002
@@ -1167,10 +1167,10 @@
 AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[
 #include <sys/time.h>
-#include <unistd.h>
-main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
+#include <unistd.h>],
+[struct timeval tv; exit(gettimeofday(&tv, NULL));],
 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then

More information about the samba-technical mailing list