[Buildroot] [PATCH 1/1] package/oatpp: fix uclibc build

Fabrice Fontaine fontaine.fabrice at gmail.com
Thu Nov 23 21:52:50 UTC 2023


Fix the following uclibc build failure raised since the addition of the
package in commit d5bba26801b352f591451cf73e0b7509de0e6850:

In file included from /home/autobuild/autobuild/instance-4/output-1/build/oatpp-1.3.0/src/oatpp/algorithm/CRC.hpp:28,
                 from /home/autobuild/autobuild/instance-4/output-1/build/oatpp-1.3.0/src/oatpp/algorithm/CRC.cpp:25:
/home/autobuild/autobuild/instance-4/output-1/build/oatpp-1.3.0/src/oatpp/core/base/Environment.hpp:359:93: error: 'va_list' has not been declared
  359 |   static void vlogFormatted(v_uint32 priority, const std::string& tag, const char* message, va_list args);
      |                                                                                             ^~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/bcdf7548ff752f936defd111d13c63245ea70cbe

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 ...base-Environment.hpp-include-cstdarg.patch | 37 +++++++++++++++++++
 package/oatpp/oatpp.mk                        |  6 +++
 2 files changed, 43 insertions(+)
 create mode 100644 package/oatpp/0001-src-oatpp-core-base-Environment.hpp-include-cstdarg.patch

diff --git a/package/oatpp/0001-src-oatpp-core-base-Environment.hpp-include-cstdarg.patch b/package/oatpp/0001-src-oatpp-core-base-Environment.hpp-include-cstdarg.patch
new file mode 100644
index 0000000000..f02215d8a9
--- /dev/null
+++ b/package/oatpp/0001-src-oatpp-core-base-Environment.hpp-include-cstdarg.patch
@@ -0,0 +1,37 @@
+From b3e8930ccbaeeb77a4cd8b0fffbe52a208aa9a29 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Date: Thu, 23 Nov 2023 22:45:56 +0100
+Subject: [PATCH] src/oatpp/core/base/Environment.hpp: include cstdarg
+
+Include cstdarg to fix the following build failure with uclibc-ng:
+
+In file included from /home/autobuild/autobuild/instance-4/output-1/build/oatpp-1.3.0/src/oatpp/algorithm/CRC.hpp:28,
+                 from /home/autobuild/autobuild/instance-4/output-1/build/oatpp-1.3.0/src/oatpp/algorithm/CRC.cpp:25:
+/home/autobuild/autobuild/instance-4/output-1/build/oatpp-1.3.0/src/oatpp/core/base/Environment.hpp:359:93: error: 'va_list' has not been declared
+  359 |   static void vlogFormatted(v_uint32 priority, const std::string& tag, const char* message, va_list args);
+      |                                                                                             ^~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/bcdf7548ff752f936defd111d13c63245ea70cbe
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Upstream: https://github.com/oatpp/oatpp/pull/895
+---
+ src/oatpp/core/base/Environment.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/oatpp/core/base/Environment.hpp b/src/oatpp/core/base/Environment.hpp
+index fd77a5c6..05d5c949 100644
+--- a/src/oatpp/core/base/Environment.hpp
++++ b/src/oatpp/core/base/Environment.hpp
+@@ -29,6 +29,7 @@
+ #include "./Compiler.hpp"
+ #include "./Config.hpp"
+ 
++#include <cstdarg>
+ #include <cstdio>
+ #include <atomic>
+ #include <mutex>
+-- 
+2.42.0
+
diff --git a/package/oatpp/oatpp.mk b/package/oatpp/oatpp.mk
index 621a549023..c8b0c9694a 100644
--- a/package/oatpp/oatpp.mk
+++ b/package/oatpp/oatpp.mk
@@ -13,4 +13,10 @@ OATPP_INSTALL_STAGING = YES
 # Only builds a static lib and headers
 OATPP_INSTALL_TARGET = NO
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
+OATPP_CONF_OPTS += -DOATPP_COMPAT_BUILD_NO_SET_AFFINITY=OFF
+else
+OATPP_CONF_OPTS += -DOATPP_COMPAT_BUILD_NO_SET_AFFINITY=ON
+endif
+
 $(eval $(cmake-package))
-- 
2.42.0




More information about the buildroot mailing list