package/mpd: add patch to fix musl gcc5 build issue
authorJörg Krause <joerg.krause@embedded.rocks>
Wed, 5 Aug 2015 10:43:49 +0000 (12:43 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 Aug 2015 06:45:13 +0000 (08:45 +0200)
commit3db495e4d787ec6a77cfe38510e68be098a98d63
tree7d7a1866e621fc5e7d6d9f965fbf646c3ef9c418
parentfe500c5c5c4a4987c060667152969da0478be198
package/mpd: add patch to fix musl gcc5 build issue

Add a patch from the Alpine Linux project [1] to fix a musl build issue with
gcc 5:

```
error: temporary of non-literal type ‘pthread_mutex_t’ in a constant expression
  constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
```

Problem has been reported by the Alpine team upstream and was closed by the MPD
maintainer with WONTFIX:
http://bugs.musicpd.org/view.php?id=4387
http://bugs.musicpd.org/view.php?id=4110

However...

POSIX does not permit using PTHREAD_COND_INITIALIZER except for static
initialization, and certainly does not permit using it as a value.

Also POSIX does not specify the type of the object (it's opaque) so if
there are any types for which their code would be invalid C++, then their
code is invalid.

Also, volatile in the type is necessary. without that, LTO can break the code.

[1]
http://git.alpinelinux.org/cgit/aports/log/main/mpd/musl-gcc5-fixes.patch

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/mpd/0002-musl-gcc5-fixes.patch [new file with mode: 0644]