All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/kismet: fix build when time_t is defined as long long
@ 2021-03-04 12:29 Fabrice Fontaine
  2021-03-04 19:53 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-03-04 12:29 UTC (permalink / raw)
  To: buildroot

On some platforms time_t is defined as long long. At the moment, the
compilation of sqlite3_column_as<time_t>(...) fails on these systems
because the appropriate getter is not defined

Fixes:
 - http://autobuild.buildroot.org/results/3a76afdbd8b564579bfb08a4d75b438dbd73ac2e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...to-read-database-values-as-long-long.patch | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/kismet/0001-Add-getter-to-read-database-values-as-long-long.patch

diff --git a/package/kismet/0001-Add-getter-to-read-database-values-as-long-long.patch b/package/kismet/0001-Add-getter-to-read-database-values-as-long-long.patch
new file mode 100644
index 0000000000..564cba87bb
--- /dev/null
+++ b/package/kismet/0001-Add-getter-to-read-database-values-as-long-long.patch
@@ -0,0 +1,28 @@
+From 1d36faad18e34b43ac8ea3e7f6a44315f827a2db Mon Sep 17 00:00:00 2001
+From: George Hopkins <george-hopkins@null.net>
+Date: Mon, 4 Jan 2021 13:59:41 +0100
+Subject: [PATCH] Add getter to read database values as long long
+
+[Retrieved from:
+https://github.com/kismetwireless/kismet/commit/1d36faad18e34b43ac8ea3e7f6a44315f827a2db]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ sqlite3_cpp11.cc | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/sqlite3_cpp11.cc b/sqlite3_cpp11.cc
+index 7974bde8c..5c92dfa87 100644
+--- a/sqlite3_cpp11.cc
++++ b/sqlite3_cpp11.cc
+@@ -411,6 +411,11 @@ namespace kissqlite3 {
+         return (unsigned long) sqlite3_column_int64(stmt.get(), column);
+     }
+ 
++    template<>
++    long long sqlite3_column_as(std::shared_ptr<sqlite3_stmt> stmt, unsigned int column) {
++        return (long long) sqlite3_column_int64(stmt.get(), column);
++    }
++
+     template<>
+     unsigned long long sqlite3_column_as(std::shared_ptr<sqlite3_stmt> stmt, unsigned int column) {
+         return (unsigned long long) sqlite3_column_int64(stmt.get(), column);
-- 
2.30.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] package/kismet: fix build when time_t is defined as long long
  2021-03-04 12:29 [Buildroot] [PATCH 1/1] package/kismet: fix build when time_t is defined as long long Fabrice Fontaine
@ 2021-03-04 19:53 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2021-03-04 19:53 UTC (permalink / raw)
  To: buildroot



On 04/03/2021 13:29, Fabrice Fontaine wrote:
> On some platforms time_t is defined as long long. At the moment, the
> compilation of sqlite3_column_as<time_t>(...) fails on these systems
> because the appropriate getter is not defined
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/3a76afdbd8b564579bfb08a4d75b438dbd73ac2e
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

 Applied to master, thanks.

 Regards,
 Arnout

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-04 19:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 12:29 [Buildroot] [PATCH 1/1] package/kismet: fix build when time_t is defined as long long Fabrice Fontaine
2021-03-04 19:53 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.