summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--as2-platform-dji-osdk.spec9
-rw-r--r--gcc12-includes.patch20
2 files changed, 28 insertions, 1 deletions
diff --git a/as2-platform-dji-osdk.spec b/as2-platform-dji-osdk.spec
index aff0442..80f92b1 100644
--- a/as2-platform-dji-osdk.spec
+++ b/as2-platform-dji-osdk.spec
@@ -4,13 +4,14 @@
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 1.1.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Package to communicate DJI OSDK with Aerostack2 framework
License: BSD-3-Clause
URL: https://github.com/aerostack2/as2_platform_dji_osdk/tree/main
Source0: %{RosPkgName}-%{src_version}.tar.gz
Source1: Onboard-SDK-master.tar.gz
Patch0: ffmpeg5-compat.patch
+Patch1: gcc12-includes.patch
%global debug_package %{nil}
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
@@ -57,6 +58,7 @@ Package to communicate DJI OSDK with Aerostack2 framework
tar xzf %{SOURCE1} -C %{_builddir}
cd %{_builddir}/Onboard-SDK-master
patch -p1 < %{PATCH0}
+patch -p1 < %{PATCH1}
cd -
%build
@@ -87,6 +89,11 @@ make install DESTDIR=%{buildroot}
/opt/ros/%{ros_distro}
%changelog
+* Sat Oct 10 2026 ai-importer <ai-importer@openeuler.org> - 1.1.0-4
+- Add gcc12-includes.patch: add #include <string> in mmap_file_buffer.hpp
+ and #include <cstdio> in mmap_file_buffer.cpp
+- Fix GCC 12 incomplete type errors for std::string and undeclared printf
+
* Sat Oct 10 2026 ai-importer <ai-importer@openeuler.org> - 1.1.0-3
- Add ffmpeg5-compat.patch for FFmpeg 5.x API compatibility
- Replace removed APIs: avcodec_register_all, avcodec_decode_video2,
diff --git a/gcc12-includes.patch b/gcc12-includes.patch
new file mode 100644
index 0000000..ff29c51
--- /dev/null
+++ b/gcc12-includes.patch
@@ -0,0 +1,20 @@
+--- a/osdk-core/modules/inc/filemgr/impl/mmap_file_buffer.hpp
++++ b/osdk-core/modules/inc/filemgr/impl/mmap_file_buffer.hpp
+@@ -10,6 +10,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <memory>
++#include <string>
+ #include <atomic>
+
+ namespace DJI {
+--- a/osdk-core/modules/src/filemgr/impl/mmap_file_buffer.cpp
++++ b/osdk-core/modules/src/filemgr/impl/mmap_file_buffer.cpp
+@@ -3,6 +3,7 @@
+ #include "mmap_file_buffer.hpp"
+ #include "dji_log.hpp"
+ #include <string.h>
++#include <cstdio>
+
+ namespace DJI {
+ namespace OSDK {