]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix, unit test and testbound work on windows Vista.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 14 Oct 2010 13:20:10 +0000 (13:20 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 14 Oct 2010 13:20:10 +0000 (13:20 +0000)
git-svn-id: file:///svn/unbound/trunk@2291 be551aaa-1e26-0410-a405-d3ace91eadb9

compat/ctime_r.c

index bdc4baf3d1edafaf66f7eaac0defc9dcfc30d7b5..2594dc17e76f429c6c347d0d12dd3693104543f9 100644 (file)
@@ -32,8 +32,11 @@ char *ctime_r(const time_t *timep, char *buf)
        }
        lock_basic_lock(&ctime_lock);
        result = ctime(timep);
-       if(buf && result)
+       if(buf && result) {
+               if(strlen(result) > 10 && result[7]==' ' && result[8]=='0')
+                       result[8]=' '; /* fix error in windows ctime */
                strcpy(buf, result);
+       }
        lock_basic_unlock(&ctime_lock);
        return result;
 }