aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authortcberner <tcberner@FreeBSD.org>2018-04-14 15:12:29 +0800
committertcberner <tcberner@FreeBSD.org>2018-04-14 15:12:29 +0800
commit6fc6510630b4e75eb960790a3c1d3cc5b853c4d9 (patch)
treedf7b3f19012124df3a97d5adbb9d7d9f6114f036 /deskutils
parent41fe86fc1e63a0e59281175a14f57b67da254265 (diff)
downloadfreebsd-ports-gnome-6fc6510630b4e75eb960790a3c1d3cc5b853c4d9.tar.gz
freebsd-ports-gnome-6fc6510630b4e75eb960790a3c1d3cc5b853c4d9.tar.zst
freebsd-ports-gnome-6fc6510630b4e75eb960790a3c1d3cc5b853c4d9.zip
deskutils/fbreader: Fix build with Clang 6
PR: 227125 Submitted by: Peter Kien <peter.kien@posteo.org> Approved by: xmj (maintainer)
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/fbreader/files/patch-fbreader_src_database_booksdb_BooksDB.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/deskutils/fbreader/files/patch-fbreader_src_database_booksdb_BooksDB.cpp b/deskutils/fbreader/files/patch-fbreader_src_database_booksdb_BooksDB.cpp
new file mode 100644
index 000000000000..f33ab96b8540
--- /dev/null
+++ b/deskutils/fbreader/files/patch-fbreader_src_database_booksdb_BooksDB.cpp
@@ -0,0 +1,25 @@
+BooksDB.cpp:148:10: error: no viable conversion from returned value of type 'bool' to function return type 'shared_ptr<Book>'
+ return false;
+ ^~~~~
+/wrkdirs/usr/ports/deskutils/fbreader/work/FBReader-0.99.6-freebsdport/fbreader/../zlibrary/core/include/shared_ptr.h:57:3: note: candidate constructor not viable: no known conversion from 'bool' to 'Book *' for 1st argument
+ shared_ptr(T *t);
+ ^
+/wrkdirs/usr/ports/deskutils/fbreader/work/FBReader-0.99.6-freebsdport/fbreader/../zlibrary/core/include/shared_ptr.h:58:3: note: candidate constructor not viable: no known conversion from 'bool' to 'const shared_ptr<Book> &' for 1st argument
+ shared_ptr(const shared_ptr<T> &t);
+ ^
+/wrkdirs/usr/ports/deskutils/fbreader/work/FBReader-0.99.6-freebsdport/fbreader/../zlibrary/core/include/shared_ptr.h:59:3: note: candidate constructor not viable: no known conversion from 'bool' to 'const weak_ptr<Book> &' for 1st argument
+ shared_ptr(const weak_ptr<T> &t);
+ ^
+1 error generated.
+
+--- fbreader/src/database/booksdb/BooksDB.cpp.orig 2014-01-11 12:45:25 UTC
++++ fbreader/src/database/booksdb/BooksDB.cpp
+@@ -145,7 +145,7 @@ shared_ptr<Book> BooksDB::loadBook(const std::string &
+
+ myFindFileId->setFileName(fileName);
+ if (!myFindFileId->run()) {
+- return false;
++ return 0;
+ }
+ ((DBIntValue&)*myLoadBook->parameter("@file_id").value()) = myFindFileId->fileId();
+ shared_ptr<DBDataReader> reader = myLoadBook->executeReader();