commit:     c7f4c74c0e3d6703a6501a8668a02740b213400b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 15 05:58:19 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 05:58:33 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7f4c74c

net-mail/qlogtools: fix build with glibc 2.33

Closes: https://bugs.gentoo.org/715702
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/qlogtools-3.1-fix-glibc-2-33.patch       | 31 +++++++++++
 .../files/qlogtools-3.1-fix-implicit-decl.patch    | 61 ++++++++++++++++++++++
 net-mail/qlogtools/qlogtools-3.1-r1.ebuild         |  2 +
 3 files changed, 94 insertions(+)

diff --git a/net-mail/qlogtools/files/qlogtools-3.1-fix-glibc-2-33.patch 
b/net-mail/qlogtools/files/qlogtools-3.1-fix-glibc-2-33.patch
new file mode 100644
index 000000000000..ea3d08561ed5
--- /dev/null
+++ b/net-mail/qlogtools/files/qlogtools-3.1-fix-glibc-2-33.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/715702
+
+From: Sam James <s...@gentoo.org>
+Date: Mon, 15 Nov 2021 05:48:50 +0000
+Subject: [PATCH 2/2] Fix build with glibc-2.33
+--- a/instcheck.c
++++ b/instcheck.c
+@@ -2,6 +2,7 @@
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+@@ -15,14 +15,14 @@ int man;
+ static void diesys(const char* msg)
+ {
+   fprintf(stderr, "installer error: %s:\n  %s\n", msg,
+-        sys_errlist[errno]);
++        strerror(errno));
+   exit(1);
+ }
+ 
+ static void diefsys(const char* msg, const char* filename)
+ {
+   fprintf(stderr, "installer error: %s '%s':\n  %s\n", msg, filename,
+-        sys_errlist[errno]);
++        strerror(errno));
+   exit(1);
+ }

diff --git a/net-mail/qlogtools/files/qlogtools-3.1-fix-implicit-decl.patch 
b/net-mail/qlogtools/files/qlogtools-3.1-fix-implicit-decl.patch
new file mode 100644
index 000000000000..18fdd1e008b4
--- /dev/null
+++ b/net-mail/qlogtools/files/qlogtools-3.1-fix-implicit-decl.patch
@@ -0,0 +1,61 @@
+From: Sam James <s...@gentoo.org>
+Date: Mon, 15 Nov 2021 05:48:39 +0000
+Subject: [PATCH 1/2] Fix implicit declarations
+--- a/installer.c
++++ b/installer.c
+@@ -1,6 +1,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- a/instcheck.c
++++ b/instcheck.c
+@@ -1,6 +1,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+--- a/tai_decode.c
++++ b/tai_decode.c
+@@ -1,5 +1,7 @@
+ #include "tai.h"
+ 
++#include <ctype.h>
++
+ static bool isdigit(char ch)
+ {
+   return ch >= '0' && ch <= '9';
+--- a/tai_decode.c
++++ b/tai_decode.c
+@@ -2,7 +2,7 @@
+ 
+ #include <ctype.h>
+ 
+-static bool isdigit(char ch)
++static bool qlogtools_isdigit(char ch)
+ {
+   return ch >= '0' && ch <= '9';
+ }
+@@ -12,11 +12,11 @@ tai* tai_decode(const char* str, const char** endptr)
+   static tai t;
+   t.seconds = 0;
+   t.nanoseconds = 0;
+-  while(isdigit(*str))
++  while(qlogtools_isdigit(*str))
+     t.seconds = (t.seconds * 10) + (*str++ - '0');
+   if(*str == '.') {
+     ++str;
+-    while(isdigit(*str))
++    while(qlogtools_isdigit(*str))
+       t.nanoseconds = (t.nanoseconds * 10) + (*str++ - '0');
+   }
+   if(endptr)
+-- 
+2.33.1
+

diff --git a/net-mail/qlogtools/qlogtools-3.1-r1.ebuild 
b/net-mail/qlogtools/qlogtools-3.1-r1.ebuild
index aab3324f175d..f420295a9323 100644
--- a/net-mail/qlogtools/qlogtools-3.1-r1.ebuild
+++ b/net-mail/qlogtools/qlogtools-3.1-r1.ebuild
@@ -19,6 +19,8 @@ RDEPEND="!app-text/multitail"
 
 PATCHES=(
        "${FILESDIR}"/qlogtools-3.1-errno.patch
+       "${FILESDIR}"/qlogtools-3.1-fix-implicit-decl.patch
+       "${FILESDIR}"/qlogtools-3.1-fix-glibc-2-33.patch
 )
 
 src_configure() {

Reply via email to