diff options
Diffstat (limited to 'media-sound/mpd')
-rw-r--r-- | media-sound/mpd/files/stupidity.patch | 35 | ||||
-rw-r--r-- | media-sound/mpd/mpd-scm.ebuild | 4 |
2 files changed, 39 insertions, 0 deletions
diff --git a/media-sound/mpd/files/stupidity.patch b/media-sound/mpd/files/stupidity.patch new file mode 100644 index 0000000..1367516 --- /dev/null +++ b/media-sound/mpd/files/stupidity.patch @@ -0,0 +1,35 @@ +diff --git a/src/util/FormatString.cxx b/src/util/FormatString.cxx +index ceb7d48e0..28825cd5c 100644 +--- a/src/util/FormatString.cxx ++++ b/src/util/FormatString.cxx +@@ -30,7 +30,6 @@ + AllocatedString<> + FormatStringV(const char *fmt, va_list args) noexcept + { +-#ifndef WIN32 + va_list tmp; + va_copy(tmp, args); + const int length = vsnprintf(NULL, 0, fmt, tmp); +@@ -43,22 +42,6 @@ FormatStringV(const char *fmt, va_list args) noexcept + char *buffer = new char[length + 1]; + vsnprintf(buffer, length + 1, fmt, args); + return AllocatedString<>::Donate(buffer); +-#else +- /* On mingw32, snprintf() expects a 64 bit integer instead of +- a "long int" for "%li". This is not consistent with our +- expectation, so we're using plain sprintf() here, hoping +- the static buffer is large enough. Sorry for this hack, +- but WIN32 development is so painful, I'm not in the mood to +- do it properly now. */ +- +- char buffer[16384]; +- vsprintf(buffer, fmt, args); +- +- const size_t length = strlen(buffer); +- char *p = new char[length + 1]; +- memcpy(p, buffer, length + 1); +- return AllocatedString<>::Donate(buffer); +-#endif + } + + AllocatedString<> diff --git a/media-sound/mpd/mpd-scm.ebuild b/media-sound/mpd/mpd-scm.ebuild index 02ad72f..ff83568 100644 --- a/media-sound/mpd/mpd-scm.ebuild +++ b/media-sound/mpd/mpd-scm.ebuild @@ -125,6 +125,10 @@ pkg_setup() { sure that MPD's pid_file is _set_." } +PATCHES=( + "${FILESDIR}/stupidity.patch" +) + src_prepare() { cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed" default |