diff options
author | pho <pho@pkgsrc.org> | 2015-01-25 14:10:03 +0000 |
---|---|---|
committer | pho <pho@pkgsrc.org> | 2015-01-25 14:10:03 +0000 |
commit | d762718c03972893c96ac942f0b20f9db95841e5 (patch) | |
tree | d299370d1d95df6032787d16c84265de07206d56 /audio | |
parent | e9a5933c873c157da5e49c0c125f1dedc1f96904 (diff) | |
download | pkgsrc-d762718c03972893c96ac942f0b20f9db95841e5.tar.gz |
Fix build failures on Darwin
patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx:
Resurrected from the Attic and added some comment.
patches/patch-src_util_Alloc.cxx,
patches/patch-src_util_Alloc.hxx:
Some platforms (e.g. Darwin 9) don't have strndup(3), but the function
xstrndup() isn't used in the first place.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/musicpd/distinfo | 5 | ||||
-rw-r--r-- | audio/musicpd/patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx | 26 | ||||
-rw-r--r-- | audio/musicpd/patches/patch-src_util_Alloc.cxx | 27 | ||||
-rw-r--r-- | audio/musicpd/patches/patch-src_util_Alloc.hxx | 22 |
4 files changed, 79 insertions, 1 deletions
diff --git a/audio/musicpd/distinfo b/audio/musicpd/distinfo index 1f23c5230fb..f2dac0167b3 100644 --- a/audio/musicpd/distinfo +++ b/audio/musicpd/distinfo @@ -1,5 +1,8 @@ -$NetBSD: distinfo,v 1.56 2015/01/18 17:36:21 wiz Exp $ +$NetBSD: distinfo,v 1.57 2015/01/25 14:10:03 pho Exp $ SHA1 (mpd-0.19.8.tar.xz) = e5e325b666474bddec6c07502fa2dcf3710a42e3 RMD160 (mpd-0.19.8.tar.xz) = eec522d7a2ba4b91c0d7e2ca44bce3a14313a69d Size (mpd-0.19.8.tar.xz) = 705108 bytes +SHA1 (patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx) = b47d79cc49a27d732a7531e23d666bf9df748bec +SHA1 (patch-src_util_Alloc.cxx) = 722fece7583eeaf600e1f695979deb1f5e664b83 +SHA1 (patch-src_util_Alloc.hxx) = 3c145405ee303400dc93fed10662ab4fef47afa5 diff --git a/audio/musicpd/patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx b/audio/musicpd/patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx new file mode 100644 index 00000000000..989be691fb5 --- /dev/null +++ b/audio/musicpd/patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx @@ -0,0 +1,26 @@ +$NetBSD: patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx,v 1.1 2015/01/25 14:10:03 pho Exp $ + +Inlining this method results in the following error on Mach-O systems +(or at least on Darwin 9): + + {standard input}:1322:FATAL:symbol: __ZZN11HttpdOutput7SendTagEPK3TagE5types + can't be a weak_definition (currently only supported in section of type + coalesced) + +This seems to be a bug in the compiler, not in MPD, but we aren't sure +what is really going on. The patch has been rejected by the upstream +for not knowing the actual cause. + +http://bugs.musicpd.org/view.php?id=4059 + +--- src/output/plugins/httpd/HttpdOutputPlugin.cxx.orig 2014-10-24 22:28:53.000000000 +0000 ++++ src/output/plugins/httpd/HttpdOutputPlugin.cxx +@@ -498,7 +498,7 @@ httpd_output_pause(AudioOutput *ao) + } + } + +-inline void ++void + HttpdOutput::SendTag(const Tag *tag) + { + assert(tag != nullptr); diff --git a/audio/musicpd/patches/patch-src_util_Alloc.cxx b/audio/musicpd/patches/patch-src_util_Alloc.cxx new file mode 100644 index 00000000000..07891f11c52 --- /dev/null +++ b/audio/musicpd/patches/patch-src_util_Alloc.cxx @@ -0,0 +1,27 @@ +$NetBSD: patch-src_util_Alloc.cxx,v 1.1 2015/01/25 14:10:03 pho Exp $ + +Some platforms (e.g. Darwin 9) don't have strndup(3), but the function +xstrndup() isn't used in the first place. + +--- src/util/Alloc.cxx.orig 2014-10-24 22:28:53.000000000 +0000 ++++ src/util/Alloc.cxx +@@ -58,19 +58,3 @@ xstrdup(const char *s) + + return p; + } +- +-char * +-xstrndup(const char *s, size_t n) +-{ +-#ifdef WIN32 +- char *p = (char *)xalloc(n + 1); +- memcpy(p, s, n); +- p[n] = 0; +-#else +- char *p = strndup(s, n); +- if (gcc_unlikely(p == nullptr)) +- oom(); +-#endif +- +- return p; +-} diff --git a/audio/musicpd/patches/patch-src_util_Alloc.hxx b/audio/musicpd/patches/patch-src_util_Alloc.hxx new file mode 100644 index 00000000000..8c7b8876dbe --- /dev/null +++ b/audio/musicpd/patches/patch-src_util_Alloc.hxx @@ -0,0 +1,22 @@ +$NetBSD: patch-src_util_Alloc.hxx,v 1.1 2015/01/25 14:10:03 pho Exp $ + +Some platforms (e.g. Darwin 9) don't have strndup(3), but the function +xstrndup() isn't used in the first place. + +--- src/util/Alloc.hxx.orig 2014-10-24 22:28:53.000000000 +0000 ++++ src/util/Alloc.hxx +@@ -54,14 +54,4 @@ gcc_malloc gcc_nonnull_all + char * + xstrdup(const char *s); + +-/** +- * Duplicate a string. Use free() to free it. +- * +- * This function never fails; in out-of-memory situations, it aborts +- * the process. +- */ +-gcc_malloc gcc_nonnull_all +-char * +-xstrndup(const char *s, size_t n); +- + #endif |