libupm: Workaround for errors with GCC13
authorHirokazu MORIKAWA <morikw2@gmail.com>
Thu, 18 May 2023 00:41:16 +0000 (09:41 +0900)
committerRosen Penev <rosenp@gmail.com>
Thu, 18 May 2023 07:28:36 +0000 (10:28 +0300)
Workaround for errors with GCC13
 https://github.com/openwrt/packages/issues/20994

patch
 https://github.com/oskarirauta/local-overrides/blob/main/libs/libupm/patches/011-gcc-13-compatibility-fixes.patch

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
libs/libupm/Makefile
libs/libupm/patches/011-gcc-13-compatibility-fixes.patch [new file with mode: 0644]

index 058dedf9b9e754512f97d5820db616facf859154..3f7c3e6080d1ae9ccec39860ca192338beab66e1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupm
 PKG_VERSION:=2.0.0
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/intel-iot-devkit/upm/tar.gz/v$(PKG_VERSION)?
diff --git a/libs/libupm/patches/011-gcc-13-compatibility-fixes.patch b/libs/libupm/patches/011-gcc-13-compatibility-fixes.patch
new file mode 100644 (file)
index 0000000..feed25e
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/src/mcp9808/mcp9808.hpp
++++ b/src/mcp9808/mcp9808.hpp
+@@ -30,6 +30,10 @@
+ #include <string>
+ #include <interfaces/iTemperature.hpp>
++#ifndef uint8_t
++#include <cstdint>
++#endif
++
+ #define MCP9808_REG_CONFIG  0x01
+ #define MCP9808_REG_AMBIENT_TEMP 0x05
+ #define MCP9808_REG_MANUF_ID 0x06
+--- a/src/micsv89/micsv89.hpp
++++ b/src/micsv89/micsv89.hpp
+@@ -27,6 +27,10 @@
+ #include <iostream>
+ #include <string>
++#ifndef uint8_t
++#include <cstdint>
++#endif
++
+ #include <interfaces/iGas.hpp>
+ namespace mraa { class I2c;}