/ Check-in [96b67881]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not use the second parameter to gettimeofday() on unix. Pass it a NULL. (CVS 3804)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 96b678818c9a536b77f10b25256facf4bff1ff65
User & Date: drh 2007-04-02 18:06:58
Context
2007-04-02
22:19
Fix to Makefile.in so that "make test" works. (CVS 3805) check-in: f592dd2d user: drh tags: trunk
18:06
Do not use the second parameter to gettimeofday() on unix. Pass it a NULL. (CVS 3804) check-in: 96b67881 user: drh tags: trunk
17:54
Fix a union initializer so that it works with the Borland compiler. (CVS 3803) check-in: a067f78b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

  2905   2905   int sqlite3UnixCurrentTime(double *prNow){
  2906   2906   #ifdef NO_GETTOD
  2907   2907     time_t t;
  2908   2908     time(&t);
  2909   2909     *prNow = t/86400.0 + 2440587.5;
  2910   2910   #else
  2911   2911     struct timeval sNow;
  2912         -  struct timezone sTz;  /* Not used */
  2913         -  gettimeofday(&sNow, &sTz);
         2912  +  gettimeofday(&sNow, 0);
  2914   2913     *prNow = 2440587.5 + sNow.tv_sec/86400.0 + sNow.tv_usec/86400000000.0;
  2915   2914   #endif
  2916   2915   #ifdef SQLITE_TEST
  2917   2916     if( sqlite3_current_time ){
  2918   2917       *prNow = sqlite3_current_time/86400.0 + 2440587.5;
  2919   2918     }
  2920   2919   #endif
  2921   2920     return 0;
  2922   2921   }
  2923   2922   
  2924   2923   #endif /* OS_UNIX */