summaryrefslogtreecommitdiff
path: root/media-sound/mpdscribble/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /media-sound/mpdscribble/files
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'media-sound/mpdscribble/files')
-rw-r--r--media-sound/mpdscribble/files/mpdscribble-0.23-gcc12-time.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/media-sound/mpdscribble/files/mpdscribble-0.23-gcc12-time.patch b/media-sound/mpdscribble/files/mpdscribble-0.23-gcc12-time.patch
new file mode 100644
index 000000000000..7a6a247d73d0
--- /dev/null
+++ b/media-sound/mpdscribble/files/mpdscribble-0.23-gcc12-time.patch
@@ -0,0 +1,37 @@
+https://github.com/MusicPlayerDaemon/mpdscribble/pull/42
+
+From: Sam James <sam@gentoo.org>
+Date: Sun, 12 Jun 2022 11:11:08 +0100
+Subject: [PATCH] Fix build with GCC 12 (missing <time.h> include)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes the following build failure with GCC 12:
+```
+FAILED: mpdscribble.p/src_Log.cxx.o
+[...]
+../mpdscribble-0.24/src/Log.cxx: In function ‘const char* log_date()’:
+../mpdscribble-0.24/src/Log.cxx:48:13: error: ‘time’ was not declared in this scope
+ 48 | t = time(nullptr);
+ | ^~~~
+../mpdscribble-0.24/src/Log.cxx:49:15: error: ‘localtime’ was not declared in this scope
+ 49 | tmp = localtime(&t);
+ | ^~~~~~~~~
+../mpdscribble-0.24/src/Log.cxx:55:14: error: ‘strftime’ was not declared in this scope
+ 55 | if (!strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z", tmp)) {
+ | ^~~~~~~~
+```
+
+Bug: https://bugs.gentoo.org/851513
+--- a/src/Log.cxx
++++ b/src/Log.cxx
+@@ -29,6 +29,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
++#include <time.h>
+
+ #ifdef HAVE_SYSLOG
+ #include <syslog.h>
+