pmaports/main/process-cpp/0001-Musl-libc-fixes.patch
Luca Weiss 8c2a95dbe2
unity8: initial packaging (!27)
* Mir starts up and is able to display system settings
* x86_64 only for now, because at least ubuntu-app-test did not build
  on aarch64

Based on PureTryOut's work. Getting it to this stage was a huge effort
(as it shows in the package count: 111(!)). See the merge request for
details.

[skip ci]: this won't finish in CI; ollieparanoid made sure that
           everything builds for x86_64.
2019-02-13 21:47:29 +01:00

55 lines
1.7 KiB
Diff

From 9e25c80e0e45c21dedc785019be95c0bbff4174d Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sun, 30 Dec 2018 18:01:32 +0100
Subject: [PATCH] Musl libc fixes
---
include/core/posix/standard_stream.h | 5 +++++
src/CMakeLists.txt | 1 +
src/core/posix/signal.cpp | 2 +-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/core/posix/standard_stream.h b/include/core/posix/standard_stream.h
index f50a9b7..1927fa8 100644
--- a/include/core/posix/standard_stream.h
+++ b/include/core/posix/standard_stream.h
@@ -23,6 +23,11 @@
#include <cstdint>
+// Musl uses "#define stdin (stdin)", so the enum declaration fails with a syntax error
+#undef stdin
+#undef stdout
+#undef stderr
+
namespace core
{
namespace posix
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 063ece1..2a9dc15 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -45,6 +45,7 @@ target_link_libraries(
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ execinfo
)
# We compile with all symbols visible by default. For the shipping library, we strip
diff --git a/src/core/posix/signal.cpp b/src/core/posix/signal.cpp
index 9c80f21..ce8bbc1 100644
--- a/src/core/posix/signal.cpp
+++ b/src/core/posix/signal.cpp
@@ -151,7 +151,7 @@ public:
{
auto result = ::read(scope.signal_fd, signal_info, sizeof(signal_info));
- for (uint i = 0; i < result / sizeof(signalfd_siginfo); i++)
+ for (unsigned int i = 0; i < result / sizeof(signalfd_siginfo); i++)
{
if (has(static_cast<core::posix::Signal>(signal_info[i].ssi_signo)))
{
--
2.20.1