termux-packages/packages/mu/lib-mu-store.cc.patch

23 lines
1.5 KiB
Diff
Raw Normal View History

2020-04-29 14:23:16 +02:00
Fix for error in i686 build:
/home/builder/.termux-build/mu/src/lib/mu-store.cc:107:26: error: non-constant-expression cannot be narrowed from type 'long long' to 'time_t' (aka 'long') in initializer list [-Wc++11-narrowing]
created_{atoll(db()->get_metadata(CreatedKey).c_str())},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/.termux-build/mu/src/lib/mu-store.cc:107:26: note: insert an explicit cast to silence this issue
created_{atoll(db()->get_metadata(CreatedKey).c_str())},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<time_t>( )
diff -u -r ../mu-1.4.3/lib/mu-store.cc ./lib/mu-store.cc
--- ../mu-1.4.3/lib/mu-store.cc 2020-03-05 20:40:06.000000000 +0000
+++ ./lib/mu-store.cc 2020-04-29 12:10:46.086507000 +0000
@@ -104,7 +104,7 @@
std::make_shared<Xapian::Database>(db_path_) :
std::make_shared<Xapian::WritableDatabase>(db_path_, Xapian::DB_OPEN)},
root_maildir_{db()->get_metadata(RootMaildirKey)},
- created_{atoll(db()->get_metadata(CreatedKey).c_str())},
+ created_{static_cast<time_t>(atoll(db()->get_metadata(CreatedKey).c_str()))},
schema_version_{db()->get_metadata(SchemaVersionKey)},
personal_addresses_{Mu::split(db()->get_metadata(PersonalAddressesKey),",")},
contacts_{db()->get_metadata(ContactsKey)} {