]> git.sur5r.net Git - openldap/commitdiff
ITS#3607 more for Win32 portability
authorHoward Chu <hyc@openldap.org>
Fri, 1 Apr 2005 08:10:26 +0000 (08:10 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 1 Apr 2005 08:10:26 +0000 (08:10 +0000)
servers/slapd/back-bdb/alock.c

index dda0aa538a4e44af001a4ceb599f6d213bc856ea..897cda3cc0cf53548cd0c1bfd6301bf3fb904fdc 100644 (file)
@@ -323,7 +323,6 @@ alock_open ( alock_info_t * info,
        alock_info_t scan_info;
        alock_slot_t slot_data;
        char * filename;
-       struct timeval tv;
        int res, max_slot;
        int dirty_count, live_count;
 
@@ -332,11 +331,8 @@ alock_open ( alock_info_t * info,
        assert (envdir != NULL);
        assert (locktype >= 1 && locktype <= 2);
 
-       res = gettimeofday (&tv, NULL);
-       if (res == -1) return ALOCK_UNSTABLE;
-
        slot_data.al_lock = locktype;
-       slot_data.al_stamp = tv.tv_sec;
+       slot_data.al_stamp = time(NULL);
        slot_data.al_pid = getpid();
        slot_data.al_appname = calloc (1, ALOCK_MAX_APPNAME);
        strncpy (slot_data.al_appname, appname, ALOCK_MAX_APPNAME-1);