5212c6
diff -up man-db-2.6.3/src/check_mandirs.c.gcc man-db-2.6.3/src/check_mandirs.c
5212c6
--- man-db-2.6.3/src/check_mandirs.c.gcc	2013-03-18 13:56:24.000000000 +0100
5212c6
+++ man-db-2.6.3/src/check_mandirs.c	2013-03-18 14:03:20.081132550 +0100
5212c6
@@ -440,7 +440,10 @@ static int testmandirs (const char *path
5212c6
 		return 0;
5212c6
 	}
5212c6
 
5212c6
-	chdir (path);
5212c6
+	if (chdir (path) != 0) {
5212c6
+		error (0, errno, _("can't change to directory %s"), path);
5212c6
+		return 0;
5212c6
+	}
5212c6
 
5212c6
 	while( (mandir = readdir (dir)) ) {
5212c6
 		if (strncmp (mandir->d_name, "man", 3) != 0)
5212c6
diff -up man-db-2.6.3/src/descriptions_store.c.gcc man-db-2.6.3/src/descriptions_store.c
5212c6
--- man-db-2.6.3/src/descriptions_store.c.gcc	2011-04-10 03:02:26.000000000 +0200
5212c6
+++ man-db-2.6.3/src/descriptions_store.c	2013-03-18 13:53:03.889580350 +0100
5212c6
@@ -71,7 +71,7 @@ void store_descriptions (const struct pa
5212c6
 
5212c6
 	if (trace) {
5212c6
 		for (i = 0; i < trace->len; ++i)
5212c6
-			debug ("trace->names[%d] = '%s'\n",
5212c6
+			debug ("trace->names[%zu] = '%s'\n",
5212c6
 			       i, trace->names[i]);
5212c6
 	}
5212c6
 
5212c6
diff -up man-db-2.6.3/src/man.c.gcc man-db-2.6.3/src/man.c