Merge pull request #2126 from lynxis/libmicrohttpd
[feed/packages.git] / sound / mpd / patches / 100-musl_gcc5_fixes.patch
1 Add a patch from the Alpine Linux project to fix a musl build issue with gcc 5:
2
3 Problem has been reported upstream and closed with WONTFIX:
4 http://bugs.musicpd.org/view.php?id=4387
5 http://bugs.musicpd.org/view.php?id=4110
6
7 however...
8
9 POSIX does not permit using PTHREAD_COND_INITIALIZER except for static
10 initialization, and certainly does not permit using it as a value
11
12 POSIX does not specify the type of the object (it's opaque) so if
13 there are any types for which their code would be invalid C++, then their
14 code is invalid
15
16 Volatile in the type is necessary. without that, LTO can break the code.
17
18 --- a/src/notify.hxx
19 +++ b/src/notify.hxx
20 @@ -28,7 +28,7 @@ struct notify {
21 Cond cond;
22 bool pending;
23
24 -#if !defined(WIN32) && !defined(__NetBSD__) && !defined(__BIONIC__)
25 +#if defined(__GLIBC__)
26 constexpr
27 #endif
28 notify():pending(false) {}