Fix midnight volume calculation to build on Windows
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 4 Dec 2009 15:52:21 +0000 (10:52 -0500)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Fri, 4 Dec 2009 19:37:23 +0000 (11:37 -0800)
Change I516d732d broke the Windows build.  localtime_r does not
exist on Windows.

Change-Id: Ib28e414a85d763dbe146bc2fadec91310f6144ab
Reviewed-on: http://gerrit.openafs.org/887
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/vol/volume.c

index 03b4bba..614abd2 100644 (file)
@@ -5052,7 +5052,7 @@ Midnight(time_t t) {
     struct tm local, *l;
     time_t midnight;
 
-#ifdef AFS_PTHREAD_ENV
+#if defined(AFS_PTHREAD_ENV) && !defined(AFS_NT40_ENV)
     l = localtime_r(&t, &local);
 #else
     l = localtime(&t);