From 9e25c80e0e45c21dedc785019be95c0bbff4174d Mon Sep 17 00:00:00 2001 From: Luca Weiss 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 +// 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/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(signal_info[i].ssi_signo))) { -- 2.20.1