openwrt-packages/utils/domoticz/patches/995-make_sure_compile_works...

34 lines
827 B
Diff

From ca4578980e373543d0561564863718c879fa7743 Mon Sep 17 00:00:00 2001
From: Rob Peters <Info@Domoticz.com>
Date: Thu, 10 Mar 2022 12:32:29 +0100
Subject: [PATCH] Making sure code can be compiled without Python
---
hardware/plugins/Plugins.h | 4 ++++
hardware/plugins/PythonObjects.h | 1 +
2 files changed, 5 insertions(+)
--- a/hardware/plugins/Plugins.h
+++ b/hardware/plugins/Plugins.h
@@ -1,5 +1,7 @@
#pragma once
+#ifdef ENABLE_PYTHON
+
#include "../DomoticzHardware.h"
#include "../hardwaretypes.h"
#include "../../notifications/NotificationBase.h"
@@ -300,3 +302,5 @@ namespace Plugins {
};
} // namespace Plugins
+
+#endif //#ifdef ENABLE_PYTHON
--- a/hardware/plugins/PythonObjects.h
+++ b/hardware/plugins/PythonObjects.h
@@ -169,3 +169,4 @@ namespace Plugins {
};
} // namespace Plugins
+