1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00
freebsd-ports/misc/kcd/files/patch-dirtree.cc
Antoine Brodin c2533ffdba - Fix build with clang
- Stage support

PR:		ports/185692
Submitted by:	KATO Tsuguru
2014-01-14 20:23:34 +00:00

29 lines
681 B
C++

--- dirtree.cc.orig 2009-02-18 13:01:05.000000000 +0100
+++ dirtree.cc 2013-05-27 18:11:32.183060000 +0200
@@ -25,6 +25,10 @@
#include "cstrlib.h"
#include "gentree.h"
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
sptr_list<DirectoryEntry> dirTree;
const char uniqueTag[] = "<KCDID#9>"; // File ID
@@ -170,12 +174,12 @@
ReadSaveFile(dirTree, filegz);
}
catch(ErrorBadFileFormat &) {
- gzclose(file);
+ gzclose(filegz);
throw ErrorGenericFile(_("invalid file format in %$"), saveFile);
}
catch(ErrorGZIO &) {
- gzclose(file);
+ gzclose(filegz);
throw ErrorGenericFile(_("error reading file %$"), saveFile);
}
gzclose(filegz);