summaryrefslogtreecommitdiff
path: root/devel/cvsps/patches/patch-ad
blob: 91f410b34d1c5f78a7926ec32a8c92eff2df346c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-ad,v 1.1 2009/08/30 17:16:54 schmonz Exp $

--- cap.c.orig	2005-05-25 23:39:40.000000000 -0400
+++ cap.c
@@ -121,11 +121,19 @@ int check_version_string(const char * st
 	return 0;
     }
 
+    /* We might have encountered a FreeBSD system which
+     * has a mucked up version string of:
+     *  Concurrent Versions System (CVS) '1.11.17'-FreeBSD (client/server)
+     * so re-test just in case
+     */
     p += skip;
     if (sscanf(p, "%d.%d.%d", &major, &minor, &extra) != 3)
     {	
-	debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str);
-	return 0;
+        if (sscanf(p, "'%d.%d.%d'", &major, &minor, &extra) != 3)
+	{
+		debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str);
+		return 0;
+	}
     }
 
     return (major > req_major ||