summaryrefslogtreecommitdiff
path: root/net-mail/qlogtools/files/qlogtools-3.1-fix-implicit-decl.patch
blob: 18fdd1e008b496aa1de7eda9fa744eef1d17a734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: Sam James <sam@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