47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
From 8eaf25c30554c7cc457406ce5895b8087904cb2b Mon Sep 17 00:00:00 2001
|
|
From: Bastien Curutchet <bastien.curutchet@bootlin.com>
|
|
Date: Wed, 17 Dec 2025 11:38:52 +0100
|
|
Subject: [PATCH] rasdaemon: fix build when sqlite isn't enabled
|
|
|
|
Build without SQLite enabled through --enable-sqlite3 still fails if
|
|
sqlite isn't available:
|
|
> CC rasdaemon-rasdaemon.o
|
|
> In file included from rasdaemon.c:17:
|
|
> ras-record.h:11:10: fatal error: sqlite3.h: No such file or directory
|
|
> 11 | #include <sqlite3.h>
|
|
> | ^~~~~~~~~~~
|
|
> compilation terminated.
|
|
|
|
Include the sqlite header only if the SQLite feature is enabled.
|
|
|
|
Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
|
|
Upstream: https://github.com/mchehab/rasdaemon/pull/234
|
|
---
|
|
ras-record.h | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/ras-record.h b/ras-record.h
|
|
index 21edcd6..cb03f4e 100644
|
|
--- a/ras-record.h
|
|
+++ b/ras-record.h
|
|
@@ -8,7 +8,6 @@
|
|
#ifndef __RAS_RECORD_H
|
|
#define __RAS_RECORD_H
|
|
|
|
-#include <sqlite3.h>
|
|
#include <fcntl.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
@@ -320,6 +319,8 @@ struct ras_cxl_memory_sparing_event;
|
|
|
|
#ifdef HAVE_SQLITE3
|
|
|
|
+#include <sqlite3.h>
|
|
+
|
|
struct sqlite3_priv {
|
|
sqlite3 *db;
|
|
sqlite3_stmt *stmt_mc_event;
|
|
--
|
|
2.52.0
|
|
|