From 0851f92abcb1e9d84c2748607ff8d548b582540c Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 2 Jan 2023 16:40:52 +0100 Subject: Fix build on Debian11 (only supported OS) --- compiledsql.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'compiledsql.cpp') diff --git a/compiledsql.cpp b/compiledsql.cpp index a3503af..818ab35 100644 --- a/compiledsql.cpp +++ b/compiledsql.cpp @@ -1,5 +1,7 @@ #include "compiledsql.h" +#include + CompiledSQL::CompiledSQL(SQLite::Database& db): m_stmt{}, m_db{db}, @@ -12,7 +14,13 @@ void CompiledSQL::init(const std::string& stmt) if (m_stmt) { m_stmt->reset(); } else { - if (stmt.starts_with("SELECT ")) { + if ( +#if __cplusplus >= 202002 + stmt.starts_with("SELECT ") +#else + boost::algorithm::starts_with(stmt, "SELECT ") +#endif + ) { m_isSelect = true; } else { m_isSelect = false; -- cgit v1.2.3