summaryrefslogtreecommitdiff
path: root/media-sound/alacenc/files/alacenc-0.4.0-musl.patch
blob: e42a0def06d97b145f3314edd18b0c276b926c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Include endian.h because otherwise constants like BYTE_ORDER,
# LITTLE_ENDIAN or BIG_ENDIAN as well as functions like
# toBigEndian are missing when building with musl.
# On glibc these symbols are present without including
# endian.h, however including it anyway is fine.
#
# Related bug: https://bugs.gentoo.org/927902
--- a/types.h
+++ b/types.h
@@ -40,6 +40,7 @@
 #include <fstream>
 #include <array>
 #include <cstdint>
+#include <endian.h>
 
 class Error : public std::runtime_error
 {
# There is no typedef for uint in musl, so replace it
# Upstream PR: https://github.com/flacon/alacenc/pull/4
--- a/atoms.cpp
+++ b/atoms.cpp
@@ -655,7 +655,7 @@ OutFile &operator<<(OutFile &os, const FreeAtom &atom)
 {
     os << uint32_t(atom.mSize);
     os << "free";
-    for (uint i = 0; i < atom.mSize - 8; ++i) {
+    for (unsigned int i = 0; i < atom.mSize - 8; ++i) {
         os << '\0';
     }
     return os;