summaryrefslogtreecommitdiff
path: root/net-irc/psybnc/files/psybnc-2.4.3-Fix-build-with-Clang-16.patch
blob: 83b9b07d73a01509ef7325f1d3ea426dfc4bcd0d (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
From 9ced946bc4f6da7ccb74573af4a9a89400f9cd69 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 23 Oct 2022 18:21:25 +0100
Subject: [PATCH] Fix build with Clang 16

Bug: https://bugs.gentoo.org/724916
Bug: https://bugs.gentoo.org/831310
Bug: https://bugs.gentoo.org/861464
Bug: https://bugs.gentoo.org/874105
--- a/src/p_client.c
+++ b/src/p_client.c
@@ -213,7 +213,7 @@ int repeatserverinit(int usern)
 }
 
 /* who is on the bounce ? */
-int cmdbwho(usern)
+int cmdbwho(int usern)
 {
     struct usernodes *th;
     int userl;
@@ -508,7 +508,7 @@ int firstwelcome(void)
 }
 
 /* first user connects */
-int firstuser(npeer)
+int firstuser(int npeer)
 {
     int linkto;
     pcontext;
--- a/tools/autoconf.c
+++ b/tools/autoconf.c
@@ -38,6 +38,7 @@
 #include <ctype.h>
 #include <signal.h>
 #include <errno.h>
+#include <time.h>
 #include "config.h"
 #include "src/p_version.h"
 
From 907107edea5f9d74b59a7c24762cfa8413a42f90 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 23 Oct 2022 18:41:05 +0100
Subject: [PATCH] Fix build with Clang 16

--- a/src/p_client.c
+++ b/src/p_client.c
@@ -22,6 +22,8 @@
 #define P_CLIENT
 
 #include <p_global.h>
+#include <stdio.h>
+#include <stdlib.h>
 
 int cmdaddlink(int usern, int type);
 int quitclient(int usern);
--- a/src/p_dcc.c
+++ b/src/p_dcc.c
@@ -22,6 +22,7 @@
 #define P_DCC
 
 #include <p_global.h>
+#include <stdlib.h>
 
 #ifdef DCCCHAT
 
--- a/src/p_hash.c
+++ b/src/p_hash.c
@@ -25,6 +25,11 @@
 
 /* local types */
 
+#ifdef IPV6
+int cmddefaultipv6(int usern);
+int cmdpreferipv6(int usern);
+#endif
+
 struct hasht {
     int commandmsgnum;
     int(*handler)(int);
@@ -174,8 +179,10 @@ struct hasht inboundhash[]={
     {1252,	printhelp,	1253,	1254	,0,0},
     {1450,	cmdbdone,	1451,	1452	,0,0},
     {1460,	cmdsetconnectdelay,	1461,	1462	,0,1},
+#ifdef IPV6
     {1480,	cmddefaultipv6,		1481,   1482    ,0,1},
     {1490,	cmdpreferipv6,		1491,   1492    ,0,0},
+#endif
 #ifdef MYSQL_IPCHECK
 #ifdef HAVE_MYSQL
     {2001,	cmdmysqlipcheck,	2002,	2003	,0,1},
--- a/src/p_inifunc.c
+++ b/src/p_inifunc.c
@@ -22,6 +22,7 @@
 #define P_INIFUNC
 
 #include <p_global.h>
+#include <stdlib.h>
 
 /* reset the config cache */
 
--- a/src/p_memory.c
+++ b/src/p_memory.c
@@ -22,6 +22,7 @@
 #define P_MEMORY
 
 #include <p_global.h>
+#include <stdlib.h>
 
 FILE *logm=NULL;
 
--- a/src/p_network.c
+++ b/src/p_network.c
@@ -22,6 +22,7 @@
 #define P_NETWORK
 
 #include <p_global.h>
+#include <stdlib.h>
 
 int netdefault(int usern, char *netname, char *myparentnick);
 
--- a/src/p_peer.c
+++ b/src/p_peer.c
@@ -22,6 +22,7 @@
 #define P_PEER
 
 #include <p_global.h>
+#include <stdlib.h>
 
 /* MySQL for IP check */
 #ifdef MYSQL_IPCHECK
--- a/src/p_script.c
+++ b/src/p_script.c
@@ -22,6 +22,7 @@
 #define P_SCRIPT
 
 #include <p_global.h>
+#include <stdlib.h>
 
 #ifdef SCRIPTING
 
--- a/src/p_server.c
+++ b/src/p_server.c
@@ -22,6 +22,8 @@
 #define P_SERVER
 
 #include <p_global.h>
+#include <stdlib.h>
+
 void create_oidentd_conf();
 
 sigjmp_buf serveralarmret;
--- a/src/p_socket.c
+++ b/src/p_socket.c
@@ -22,6 +22,7 @@
 #define P_SOCKET
 
 #include <p_global.h>
+#include <stdlib.h>
 
 #define MAX_SENDQ 1000
 
--- a/src/p_string.c
+++ b/src/p_string.c
@@ -22,6 +22,7 @@
 #define P_STRING
 
 #include <p_global.h>
+#include <stdlib.h>
 
 char langname[100];
 
--- a/src/p_topology.c
+++ b/src/p_topology.c
@@ -22,7 +22,7 @@
 #define P_TOPOLOGY
 
 #include <p_global.h>
-
+#include <stdlib.h>
 
 #define TP_ROOT		0
 #define TP_LTO		1
--- a/src/p_uchannel.c
+++ b/src/p_uchannel.c
@@ -22,6 +22,7 @@
 #define P_UCHANNEL
 
 #include <p_global.h>
+#include <stdlib.h>
 
 /* bring the channel modes into the right order, return formulated mode */
 
--- a/src/p_userfile.c
+++ b/src/p_userfile.c
@@ -22,6 +22,7 @@
 #define P_USERFILE
 
 #include <p_global.h>
+#include <stdlib.h>
 
 /* loading a specific user */
 
--- a/src/psybnc.c
+++ b/src/psybnc.c
@@ -34,6 +34,7 @@
 
 #include <p_global.h>
 #include <p_data.h>
+#include <stdlib.h>
 
 int slice=0;