From: Howard Chu Date: Fri, 1 Apr 2005 08:10:26 +0000 (+0000) Subject: ITS#3607 more for Win32 portability X-Git-Tag: OPENLDAP_AC_BP~1020 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=04f6efbe1c885eb4968a97fe5f78fe5c5ade1081;p=openldap ITS#3607 more for Win32 portability --- diff --git a/servers/slapd/back-bdb/alock.c b/servers/slapd/back-bdb/alock.c index dda0aa538a..897cda3cc0 100644 --- a/servers/slapd/back-bdb/alock.c +++ b/servers/slapd/back-bdb/alock.c @@ -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);