diff options
3 files changed, 1243 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/0001-Fix-more-non-prototype-functions.patch b/meta-oe/recipes-connectivity/krb5/krb5/0001-Fix-more-non-prototype-functions.patch new file mode 100644 index 0000000000..d4267b3bf7 --- /dev/null +++ b/meta-oe/recipes-connectivity/krb5/krb5/0001-Fix-more-non-prototype-functions.patch | |||
@@ -0,0 +1,862 @@ | |||
1 | From 5a9aa1607ff2bc94369c89f4c99725125b923977 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjun <pkillarjun@protonmail.com> | ||
3 | Date: Thu, 9 May 2024 20:47:08 +0530 | ||
4 | Subject: [PATCH 1/2] Fix more non-prototype functions | ||
5 | |||
6 | Add "void" designations to more function declarations and definitions | ||
7 | not changed by commits 3ae9244cd021a75eba909d872a92c25db490714d and | ||
8 | 4b9d7f7c107f01a61600fddcd8cde3812d0366a2. | ||
9 | |||
10 | [ghudson@mit.edu: change additional functions; split into two commits; | ||
11 | rewrote commit message] | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/krb5/krb5/commit/623d649ba852839ba4822934bad9f97c184bf3ab] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | src/ccapi/common/win/OldCC/ccutils.c | 2 +- | ||
17 | src/ccapi/common/win/OldCC/ccutils.h | 2 +- | ||
18 | src/ccapi/common/win/OldCC/util.h | 2 +- | ||
19 | src/ccapi/common/win/win-utils.c | 2 +- | ||
20 | src/ccapi/common/win/win-utils.h | 4 +- | ||
21 | src/ccapi/lib/ccapi_context.h | 2 +- | ||
22 | src/ccapi/lib/win/dllmain.h | 2 +- | ||
23 | src/ccapi/server/ccs_server.c | 2 +- | ||
24 | src/ccapi/server/ccs_server.h | 2 +- | ||
25 | src/ccapi/server/win/WorkQueue.h | 8 +-- | ||
26 | src/ccapi/test/pingtest.c | 2 +- | ||
27 | src/include/gssrpc/netdb.h | 4 +- | ||
28 | src/include/port-sockets.h | 2 +- | ||
29 | src/kadmin/cli/getdate.y | 2 +- | ||
30 | src/kadmin/dbutil/kdb5_util.c | 2 +- | ||
31 | src/kprop/kprop.c | 2 +- | ||
32 | src/lib/crypto/crypto_tests/t_pkcs5.c | 4 +- | ||
33 | src/lib/crypto/crypto_tests/vectors.c | 10 ++-- | ||
34 | src/lib/gssapi/generic/maptest.c | 2 +- | ||
35 | src/lib/krb5/ccache/ccapi/stdcc.c | 6 +- | ||
36 | src/lib/krb5/ccache/ccapi/winccld.c | 9 ++- | ||
37 | src/lib/krb5/ccache/ccbase.c | 2 +- | ||
38 | src/lib/krb5/krb/bld_princ.c | 4 +- | ||
39 | src/lib/krb5/krb/conv_creds.c | 2 +- | ||
40 | src/lib/krb5/krb/init_ctx.c | 2 +- | ||
41 | src/lib/krb5/os/dnsglue.c | 4 +- | ||
42 | src/lib/krb5/os/localaddr.c | 6 +- | ||
43 | src/lib/rpc/getrpcent.c | 6 +- | ||
44 | src/lib/win_glue.c | 8 +-- | ||
45 | src/plugins/kdb/db2/kdb_db2.c | 4 +- | ||
46 | src/plugins/kdb/db2/libdb2/hash/dbm.c | 2 +- | ||
47 | .../kdb/ldap/libkdb_ldap/kdb_ldap_conn.c | 4 +- | ||
48 | src/tests/threads/gss-perf.c | 4 +- | ||
49 | src/tests/threads/init_ctx.c | 2 +- | ||
50 | src/tests/threads/profread.c | 2 +- | ||
51 | src/tests/threads/t_rcache.c | 2 +- | ||
52 | src/util/et/com_err.c | 4 +- | ||
53 | src/util/et/error_message.c | 2 +- | ||
54 | src/util/profile/prof_file.c | 4 +- | ||
55 | src/util/support/secure_getenv.c | 2 +- | ||
56 | src/windows/include/leashwin.h | 60 +++++++++---------- | ||
57 | 41 files changed, 100 insertions(+), 99 deletions(-) | ||
58 | |||
59 | diff --git a/src/ccapi/common/win/OldCC/ccutils.c b/src/ccapi/common/win/OldCC/ccutils.c | ||
60 | index 403c67e..7abaefa 100644 | ||
61 | --- a/src/ccapi/common/win/OldCC/ccutils.c | ||
62 | +++ b/src/ccapi/common/win/OldCC/ccutils.c | ||
63 | @@ -30,7 +30,7 @@ | ||
64 | #include "cci_debugging.h" | ||
65 | #include "util.h" | ||
66 | |||
67 | -BOOL isNT() { | ||
68 | +BOOL isNT(void) { | ||
69 | OSVERSIONINFO osvi; | ||
70 | DWORD status = 0; | ||
71 | BOOL bSupportedVersion = FALSE; | ||
72 | diff --git a/src/ccapi/common/win/OldCC/ccutils.h b/src/ccapi/common/win/OldCC/ccutils.h | ||
73 | index 9da3d87..0fb7e14 100644 | ||
74 | --- a/src/ccapi/common/win/OldCC/ccutils.h | ||
75 | +++ b/src/ccapi/common/win/OldCC/ccutils.h | ||
76 | @@ -33,7 +33,7 @@ extern "C" { | ||
77 | #define REPLY_SUFFIX (char*)"reply" | ||
78 | #define LISTEN_SUFFIX (char*)"listen" | ||
79 | |||
80 | -BOOL isNT(); | ||
81 | +BOOL isNT(void); | ||
82 | char* allocEventName (char* uuid, char* suffix); | ||
83 | HANDLE createThreadEvent(char* uuid, char* suffix); | ||
84 | HANDLE openThreadEvent (char* uuid, char* suffix); | ||
85 | diff --git a/src/ccapi/common/win/OldCC/util.h b/src/ccapi/common/win/OldCC/util.h | ||
86 | index 45e069a..7ee5319 100644 | ||
87 | --- a/src/ccapi/common/win/OldCC/util.h | ||
88 | +++ b/src/ccapi/common/win/OldCC/util.h | ||
89 | @@ -30,7 +30,7 @@ | ||
90 | extern "C" { | ||
91 | #endif | ||
92 | |||
93 | -BOOL isNT(); | ||
94 | +BOOL isNT(void); | ||
95 | |||
96 | void* | ||
97 | user_allocate( | ||
98 | diff --git a/src/ccapi/common/win/win-utils.c b/src/ccapi/common/win/win-utils.c | ||
99 | index b49cca8..d9018a6 100644 | ||
100 | --- a/src/ccapi/common/win/win-utils.c | ||
101 | +++ b/src/ccapi/common/win/win-utils.c | ||
102 | @@ -60,7 +60,7 @@ char* serverEndpoint(const char* user) { | ||
103 | return _serverEndpoint; | ||
104 | } | ||
105 | |||
106 | -char* timestamp() { | ||
107 | +char* timestamp(void) { | ||
108 | SYSTEMTIME _stime; | ||
109 | GetSystemTime(&_stime); | ||
110 | GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, &_stime, "HH:mm:ss", _ts, sizeof(_ts)-1); | ||
111 | diff --git a/src/ccapi/common/win/win-utils.h b/src/ccapi/common/win/win-utils.h | ||
112 | index 41cab24..94d0a9f 100644 | ||
113 | --- a/src/ccapi/common/win/win-utils.h | ||
114 | +++ b/src/ccapi/common/win/win-utils.h | ||
115 | @@ -50,6 +50,6 @@ char* clientEndpoint(const char* UUID); | ||
116 | char* serverEndpoint(const char* UUID); | ||
117 | extern unsigned char* pszProtocolSequence; | ||
118 | |||
119 | -char* timestamp(); | ||
120 | +char* timestamp(void); | ||
121 | |||
122 | -#endif // _win_utils_h | ||
123 | \ No newline at end of file | ||
124 | +#endif // _win_utils_h | ||
125 | diff --git a/src/ccapi/lib/ccapi_context.h b/src/ccapi/lib/ccapi_context.h | ||
126 | index 51b8982..88f0ee8 100644 | ||
127 | --- a/src/ccapi/lib/ccapi_context.h | ||
128 | +++ b/src/ccapi/lib/ccapi_context.h | ||
129 | @@ -79,7 +79,7 @@ cc_int32 ccapi_context_compare (cc_context_t in_context, | ||
130 | cc_uint32 *out_equal); | ||
131 | |||
132 | #ifdef WIN32 | ||
133 | -void cci_thread_init__auxinit(); | ||
134 | +void cci_thread_init__auxinit(void); | ||
135 | #endif | ||
136 | |||
137 | |||
138 | diff --git a/src/ccapi/lib/win/dllmain.h b/src/ccapi/lib/win/dllmain.h | ||
139 | index 8238566..28ca34e 100644 | ||
140 | --- a/src/ccapi/lib/win/dllmain.h | ||
141 | +++ b/src/ccapi/lib/win/dllmain.h | ||
142 | @@ -32,7 +32,7 @@ | ||
143 | extern "C" { // we need to export the C interface | ||
144 | #endif | ||
145 | |||
146 | -DWORD GetTlsIndex(); | ||
147 | +DWORD GetTlsIndex(void); | ||
148 | |||
149 | #ifdef __cplusplus | ||
150 | } | ||
151 | diff --git a/src/ccapi/server/ccs_server.c b/src/ccapi/server/ccs_server.c | ||
152 | index 1fc8d2c..de74b71 100644 | ||
153 | --- a/src/ccapi/server/ccs_server.c | ||
154 | +++ b/src/ccapi/server/ccs_server.c | ||
155 | @@ -402,7 +402,7 @@ cc_int32 ccs_server_send_reply (ccs_pipe_t in_reply_pipe, | ||
156 | |||
157 | /* ------------------------------------------------------------------------ */ | ||
158 | |||
159 | -cc_uint64 ccs_server_client_count () | ||
160 | +cc_uint64 ccs_server_client_count (void) | ||
161 | { | ||
162 | return ccs_client_array_count (g_client_array); | ||
163 | } | ||
164 | diff --git a/src/ccapi/server/ccs_server.h b/src/ccapi/server/ccs_server.h | ||
165 | index e920ad9..f71ab06 100644 | ||
166 | --- a/src/ccapi/server/ccs_server.h | ||
167 | +++ b/src/ccapi/server/ccs_server.h | ||
168 | @@ -48,6 +48,6 @@ cc_int32 ccs_server_send_reply (ccs_pipe_t in_reply_pipe, | ||
169 | cc_int32 in_reply_err, | ||
170 | k5_ipc_stream in_reply_data); | ||
171 | |||
172 | -cc_uint64 ccs_server_client_count (); | ||
173 | +cc_uint64 ccs_server_client_count (void); | ||
174 | |||
175 | #endif /* CCS_SERVER_H */ | ||
176 | diff --git a/src/ccapi/server/win/WorkQueue.h b/src/ccapi/server/win/WorkQueue.h | ||
177 | index 68aa8b1..66a2960 100644 | ||
178 | --- a/src/ccapi/server/win/WorkQueue.h | ||
179 | +++ b/src/ccapi/server/win/WorkQueue.h | ||
180 | @@ -29,14 +29,14 @@ | ||
181 | #include "windows.h" | ||
182 | #include "ccs_pipe.h" | ||
183 | |||
184 | -EXTERN_C int worklist_initialize(); | ||
185 | +EXTERN_C int worklist_initialize(void); | ||
186 | |||
187 | -EXTERN_C int worklist_cleanup(); | ||
188 | +EXTERN_C int worklist_cleanup(void); | ||
189 | |||
190 | /* Wait for work to be added to the list (via worklist_add) from another thread */ | ||
191 | -EXTERN_C void worklist_wait(); | ||
192 | +EXTERN_C void worklist_wait(void); | ||
193 | |||
194 | -EXTERN_C BOOL worklist_isEmpty(); | ||
195 | +EXTERN_C BOOL worklist_isEmpty(void); | ||
196 | |||
197 | EXTERN_C int worklist_add( const long rpcmsg, | ||
198 | const ccs_pipe_t pipe, | ||
199 | diff --git a/src/ccapi/test/pingtest.c b/src/ccapi/test/pingtest.c | ||
200 | index 0ffc15e..24327c2 100644 | ||
201 | --- a/src/ccapi/test/pingtest.c | ||
202 | +++ b/src/ccapi/test/pingtest.c | ||
203 | @@ -23,7 +23,7 @@ extern cc_int32 cci_os_ipc_msg( cc_int32 in_launch_server, | ||
204 | |||
205 | static DWORD dwTlsIndex; | ||
206 | |||
207 | -DWORD GetTlsIndex() {return dwTlsIndex;} | ||
208 | +DWORD GetTlsIndex(void) {return dwTlsIndex;} | ||
209 | |||
210 | RPC_STATUS send_test(char* endpoint) { | ||
211 | unsigned char* pszNetworkAddress = NULL; | ||
212 | diff --git a/src/include/gssrpc/netdb.h b/src/include/gssrpc/netdb.h | ||
213 | index f933fbb..2f62edf 100644 | ||
214 | --- a/src/include/gssrpc/netdb.h | ||
215 | +++ b/src/include/gssrpc/netdb.h | ||
216 | @@ -53,6 +53,8 @@ struct rpcent { | ||
217 | }; | ||
218 | #endif /*STRUCT_RPCENT_IN_RPC_NETDB_H*/ | ||
219 | |||
220 | -struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent(); | ||
221 | +struct rpcent *getrpcbyname(const char *name); | ||
222 | +struct rpcent *getrpcbynumber(int number); | ||
223 | +struct rpcent *getrpcent(void); | ||
224 | |||
225 | #endif | ||
226 | diff --git a/src/include/port-sockets.h b/src/include/port-sockets.h | ||
227 | index 57e5d1d..228e4cf 100644 | ||
228 | --- a/src/include/port-sockets.h | ||
229 | +++ b/src/include/port-sockets.h | ||
230 | @@ -111,7 +111,7 @@ static __inline void TranslatedWSASetLastError(int posix_error) | ||
231 | * Translate Winsock errors to their POSIX counterparts. This is necessary for | ||
232 | * MSVC 2010+, where both Winsock and POSIX errors are defined. | ||
233 | */ | ||
234 | -static __inline int TranslatedWSAGetLastError() | ||
235 | +static __inline int TranslatedWSAGetLastError(void) | ||
236 | { | ||
237 | int err = WSAGetLastError(); | ||
238 | switch (err) { | ||
239 | diff --git a/src/kadmin/cli/getdate.y b/src/kadmin/cli/getdate.y | ||
240 | index 3d69f0b..b69e26e 100644 | ||
241 | --- a/src/kadmin/cli/getdate.y | ||
242 | +++ b/src/kadmin/cli/getdate.y | ||
243 | @@ -775,7 +775,7 @@ LookupWord(char *buff) | ||
244 | |||
245 | |||
246 | static int | ||
247 | -yylex() | ||
248 | +yylex(void) | ||
249 | { | ||
250 | char c; | ||
251 | char *p; | ||
252 | diff --git a/src/kadmin/dbutil/kdb5_util.c b/src/kadmin/dbutil/kdb5_util.c | ||
253 | index 55d529f..3a07fd5 100644 | ||
254 | --- a/src/kadmin/dbutil/kdb5_util.c | ||
255 | +++ b/src/kadmin/dbutil/kdb5_util.c | ||
256 | @@ -74,7 +74,7 @@ int exit_status = 0; | ||
257 | krb5_context util_context; | ||
258 | kadm5_config_params global_params; | ||
259 | |||
260 | -void usage() | ||
261 | +void usage(void) | ||
262 | { | ||
263 | fprintf(stderr, | ||
264 | _("Usage: kdb5_util [-r realm] [-d dbname] " | ||
265 | diff --git a/src/kprop/kprop.c b/src/kprop/kprop.c | ||
266 | index 8f9fd69..e8f7feb 100644 | ||
267 | --- a/src/kprop/kprop.c | ||
268 | +++ b/src/kprop/kprop.c | ||
269 | @@ -80,7 +80,7 @@ static void send_error(krb5_context context, krb5_creds *my_creds, int fd, | ||
270 | char *err_text, krb5_error_code err_code); | ||
271 | static void update_last_prop_file(char *hostname, char *file_name); | ||
272 | |||
273 | -static void usage() | ||
274 | +static void usage(void) | ||
275 | { | ||
276 | fprintf(stderr, _("\nUsage: %s [-r realm] [-f file] [-d] [-P port] " | ||
277 | "[-s keytab] replica_host\n\n"), progname); | ||
278 | diff --git a/src/lib/crypto/crypto_tests/t_pkcs5.c b/src/lib/crypto/crypto_tests/t_pkcs5.c | ||
279 | index 8e87a80..f4bb33e 100644 | ||
280 | --- a/src/lib/crypto/crypto_tests/t_pkcs5.c | ||
281 | +++ b/src/lib/crypto/crypto_tests/t_pkcs5.c | ||
282 | @@ -38,7 +38,7 @@ static void printdata (krb5_data *d) { | ||
283 | printhex (d->length, d->data); | ||
284 | } | ||
285 | |||
286 | -static void test_pbkdf2_rfc3211() | ||
287 | +static void test_pbkdf2_rfc3211(void) | ||
288 | { | ||
289 | char x[100]; | ||
290 | krb5_error_code err; | ||
291 | @@ -92,7 +92,7 @@ static void test_pbkdf2_rfc3211() | ||
292 | } | ||
293 | } | ||
294 | |||
295 | -int main () | ||
296 | +int main(void) | ||
297 | { | ||
298 | test_pbkdf2_rfc3211(); | ||
299 | return 0; | ||
300 | diff --git a/src/lib/crypto/crypto_tests/vectors.c b/src/lib/crypto/crypto_tests/vectors.c | ||
301 | index bcf5c91..314d5c7 100644 | ||
302 | --- a/src/lib/crypto/crypto_tests/vectors.c | ||
303 | +++ b/src/lib/crypto/crypto_tests/vectors.c | ||
304 | @@ -56,7 +56,7 @@ static void printdata (krb5_data *d) { printhex (d->length, d->data); } | ||
305 | |||
306 | static void printkey (krb5_keyblock *k) { printhex (k->length, k->contents); } | ||
307 | |||
308 | -static void test_nfold () | ||
309 | +static void test_nfold (void) | ||
310 | { | ||
311 | int i; | ||
312 | static const struct { | ||
313 | @@ -96,7 +96,7 @@ static void test_nfold () | ||
314 | so try to generate them. */ | ||
315 | |||
316 | static void | ||
317 | -test_mit_des_s2k () | ||
318 | +test_mit_des_s2k (void) | ||
319 | { | ||
320 | static const struct { | ||
321 | const char *pass; | ||
322 | @@ -190,7 +190,7 @@ test_s2k (krb5_enctype enctype) | ||
323 | } | ||
324 | } | ||
325 | |||
326 | -static void test_des3_s2k () { test_s2k (ENCTYPE_DES3_CBC_SHA1); } | ||
327 | +static void test_des3_s2k (void) { test_s2k (ENCTYPE_DES3_CBC_SHA1); } | ||
328 | |||
329 | static void | ||
330 | keyToData (krb5_keyblock *k, krb5_data *d) | ||
331 | @@ -227,7 +227,7 @@ void DR (krb5_data *out, krb5_keyblock *in, const krb5_data *usage) { | ||
332 | #define KEYBYTES 21 | ||
333 | #define KEYLENGTH 24 | ||
334 | |||
335 | -void test_dr_dk () | ||
336 | +void test_dr_dk (void) | ||
337 | { | ||
338 | static const struct { | ||
339 | unsigned char keydata[KEYLENGTH]; | ||
340 | @@ -371,7 +371,7 @@ static void printk(const char *descr, krb5_keyblock *k) { | ||
341 | |||
342 | |||
343 | static void | ||
344 | -test_pbkdf2() | ||
345 | +test_pbkdf2(void) | ||
346 | { | ||
347 | static struct { | ||
348 | int count; | ||
349 | diff --git a/src/lib/gssapi/generic/maptest.c b/src/lib/gssapi/generic/maptest.c | ||
350 | index 566d88c..ab3ed90 100644 | ||
351 | --- a/src/lib/gssapi/generic/maptest.c | ||
352 | +++ b/src/lib/gssapi/generic/maptest.c | ||
353 | @@ -42,7 +42,7 @@ static void intprt(int v, FILE *f) | ||
354 | |||
355 | foo foo1; | ||
356 | |||
357 | -int main () | ||
358 | +int main (void) | ||
359 | { | ||
360 | elt v1 = { 1, 2 }, v2 = { 3, 4 }; | ||
361 | const elt *vp; | ||
362 | diff --git a/src/lib/krb5/ccache/ccapi/stdcc.c b/src/lib/krb5/ccache/ccapi/stdcc.c | ||
363 | index 427b329..9cd2ad3 100644 | ||
364 | --- a/src/lib/krb5/ccache/ccapi/stdcc.c | ||
365 | +++ b/src/lib/krb5/ccache/ccapi/stdcc.c | ||
366 | @@ -101,7 +101,7 @@ krb5_cc_ops krb5_cc_stdcc_ops = { | ||
367 | * changes made. We register a unique message type with which | ||
368 | * we'll communicate to all other processes. | ||
369 | */ | ||
370 | -static void cache_changed() | ||
371 | +static void cache_changed(void) | ||
372 | { | ||
373 | static unsigned int message = 0; | ||
374 | |||
375 | @@ -112,7 +112,7 @@ static void cache_changed() | ||
376 | } | ||
377 | #else /* _WIN32 */ | ||
378 | |||
379 | -static void cache_changed() | ||
380 | +static void cache_changed(void) | ||
381 | { | ||
382 | return; | ||
383 | } | ||
384 | @@ -242,7 +242,7 @@ static krb5_error_code stdccv3_setup (krb5_context context, | ||
385 | } | ||
386 | |||
387 | /* krb5_stdcc_shutdown is exported; use the old name */ | ||
388 | -void krb5_stdcc_shutdown() | ||
389 | +void krb5_stdcc_shutdown(void) | ||
390 | { | ||
391 | if (gCntrlBlock) { cc_context_release(gCntrlBlock); } | ||
392 | gCntrlBlock = NULL; | ||
393 | diff --git a/src/lib/krb5/ccache/ccapi/winccld.c b/src/lib/krb5/ccache/ccapi/winccld.c | ||
394 | index 8b2e90c..62b1bd7 100644 | ||
395 | --- a/src/lib/krb5/ccache/ccapi/winccld.c | ||
396 | +++ b/src/lib/krb5/ccache/ccapi/winccld.c | ||
397 | @@ -18,8 +18,8 @@ extern const krb5_cc_ops krb5_fcc_ops; | ||
398 | |||
399 | static int krb5_win_ccdll_loaded = 0; | ||
400 | |||
401 | -extern void krb5_win_ccdll_load(); | ||
402 | -extern int krb5_is_ccdll_loaded(); | ||
403 | +extern void krb5_win_ccdll_load(krb5_context context); | ||
404 | +extern int krb5_is_ccdll_loaded(void); | ||
405 | |||
406 | /* | ||
407 | * return codes | ||
408 | @@ -81,8 +81,7 @@ static int LoadFuncs(const char* dll_name, FUNC_INFO fi[], | ||
409 | return LF_OK; | ||
410 | } | ||
411 | |||
412 | -void krb5_win_ccdll_load(context) | ||
413 | - krb5_context context; | ||
414 | +void krb5_win_ccdll_load(krb5_context context) | ||
415 | { | ||
416 | krb5_cc_register(context, &krb5_fcc_ops, 0); | ||
417 | if (krb5_win_ccdll_loaded) | ||
418 | @@ -93,7 +92,7 @@ void krb5_win_ccdll_load(context) | ||
419 | krb5_cc_dfl_ops = &krb5_cc_stdcc_ops; /* Use stdcc! */ | ||
420 | } | ||
421 | |||
422 | -int krb5_is_ccdll_loaded() | ||
423 | +int krb5_is_ccdll_loaded(void) | ||
424 | { | ||
425 | return krb5_win_ccdll_loaded; | ||
426 | } | ||
427 | diff --git a/src/lib/krb5/ccache/ccbase.c b/src/lib/krb5/ccache/ccbase.c | ||
428 | index 5a01320..696b681 100644 | ||
429 | --- a/src/lib/krb5/ccache/ccbase.c | ||
430 | +++ b/src/lib/krb5/ccache/ccbase.c | ||
431 | @@ -614,7 +614,7 @@ k5_cccol_unlock(krb5_context context) | ||
432 | |||
433 | /* necessary to make reentrant locks play nice with krb5int_cc_finalize */ | ||
434 | void | ||
435 | -k5_cccol_force_unlock() | ||
436 | +k5_cccol_force_unlock(void) | ||
437 | { | ||
438 | /* sanity check */ | ||
439 | if ((&cccol_lock)->refcount == 0) { | ||
440 | diff --git a/src/lib/krb5/krb/bld_princ.c b/src/lib/krb5/krb/bld_princ.c | ||
441 | index ff8265a..701454f 100644 | ||
442 | --- a/src/lib/krb5/krb/bld_princ.c | ||
443 | +++ b/src/lib/krb5/krb/bld_princ.c | ||
444 | @@ -170,13 +170,13 @@ const krb5_principal_data anon_princ = { | ||
445 | }; | ||
446 | |||
447 | const krb5_data * KRB5_CALLCONV | ||
448 | -krb5_anonymous_realm() | ||
449 | +krb5_anonymous_realm(void) | ||
450 | { | ||
451 | return &anon_realm_data; | ||
452 | } | ||
453 | |||
454 | krb5_const_principal KRB5_CALLCONV | ||
455 | -krb5_anonymous_principal() | ||
456 | +krb5_anonymous_principal(void) | ||
457 | { | ||
458 | return &anon_princ; | ||
459 | } | ||
460 | diff --git a/src/lib/krb5/krb/conv_creds.c b/src/lib/krb5/krb/conv_creds.c | ||
461 | index 6f46088..8d0a317 100644 | ||
462 | --- a/src/lib/krb5/krb/conv_creds.c | ||
463 | +++ b/src/lib/krb5/krb/conv_creds.c | ||
464 | @@ -55,7 +55,7 @@ krb524_convert_creds_kdc(krb5_context context, krb5_creds *v5creds, | ||
465 | return KRB524_KRB4_DISABLED; | ||
466 | } | ||
467 | |||
468 | -void KRB5_CALLCONV krb524_init_ets () | ||
469 | +void KRB5_CALLCONV krb524_init_ets (void) | ||
470 | { | ||
471 | } | ||
472 | #endif | ||
473 | diff --git a/src/lib/krb5/krb/init_ctx.c b/src/lib/krb5/krb/init_ctx.c | ||
474 | index a6c2bbe..8fd9403 100644 | ||
475 | --- a/src/lib/krb5/krb/init_ctx.c | ||
476 | +++ b/src/lib/krb5/krb/init_ctx.c | ||
477 | @@ -66,7 +66,7 @@ static krb5_enctype default_enctype_list[] = { | ||
478 | }; | ||
479 | |||
480 | #if (defined(_WIN32)) | ||
481 | -extern krb5_error_code krb5_vercheck(); | ||
482 | +extern krb5_error_code krb5_vercheck(void); | ||
483 | extern void krb5_win_ccdll_load(krb5_context context); | ||
484 | #endif | ||
485 | |||
486 | diff --git a/src/lib/krb5/os/dnsglue.c b/src/lib/krb5/os/dnsglue.c | ||
487 | index 668a7a6..5da550c 100644 | ||
488 | --- a/src/lib/krb5/os/dnsglue.c | ||
489 | +++ b/src/lib/krb5/os/dnsglue.c | ||
490 | @@ -439,7 +439,7 @@ cleanup: | ||
491 | } | ||
492 | |||
493 | char * | ||
494 | -k5_primary_domain() | ||
495 | +k5_primary_domain(void) | ||
496 | { | ||
497 | return NULL; | ||
498 | } | ||
499 | @@ -497,7 +497,7 @@ errout: | ||
500 | } | ||
501 | |||
502 | char * | ||
503 | -k5_primary_domain() | ||
504 | +k5_primary_domain(void) | ||
505 | { | ||
506 | char *domain; | ||
507 | DECLARE_HANDLE(h); | ||
508 | diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c | ||
509 | index 92d765f..4e9d07f 100644 | ||
510 | --- a/src/lib/krb5/os/localaddr.c | ||
511 | +++ b/src/lib/krb5/os/localaddr.c | ||
512 | @@ -363,7 +363,7 @@ struct linux_ipv6_addr_list { | ||
513 | struct linux_ipv6_addr_list *next; | ||
514 | }; | ||
515 | static struct linux_ipv6_addr_list * | ||
516 | -get_linux_ipv6_addrs () | ||
517 | +get_linux_ipv6_addrs (void) | ||
518 | { | ||
519 | struct linux_ipv6_addr_list *lst = 0; | ||
520 | FILE *f; | ||
521 | @@ -1082,7 +1082,7 @@ static int print_addr (/*@unused@*/ void *dataptr, struct sockaddr *sa) | ||
522 | return 0; | ||
523 | } | ||
524 | |||
525 | -int main () | ||
526 | +int main (void) | ||
527 | { | ||
528 | int r; | ||
529 | |||
530 | @@ -1417,7 +1417,7 @@ get_localaddrs (krb5_context context, krb5_address ***addr, int use_profile) | ||
531 | * by Robert Quinn | ||
532 | */ | ||
533 | #if defined(_WIN32) | ||
534 | -static struct hostent *local_addr_fallback_kludge() | ||
535 | +static struct hostent *local_addr_fallback_kludge(void) | ||
536 | { | ||
537 | static struct hostent host; | ||
538 | static SOCKADDR_IN addr; | ||
539 | diff --git a/src/lib/rpc/getrpcent.c b/src/lib/rpc/getrpcent.c | ||
540 | index ad6793f..b3d94bc 100644 | ||
541 | --- a/src/lib/rpc/getrpcent.c | ||
542 | +++ b/src/lib/rpc/getrpcent.c | ||
543 | @@ -56,10 +56,10 @@ struct rpcdata { | ||
544 | char line[BUFSIZ+1]; | ||
545 | char *domain; | ||
546 | } *rpcdata; | ||
547 | -static struct rpcdata *get_rpcdata(); | ||
548 | +static struct rpcdata *get_rpcdata(void); | ||
549 | |||
550 | -static struct rpcent *interpret(); | ||
551 | -struct hostent *gethostent(); | ||
552 | +static struct rpcent *interpret(void); | ||
553 | +struct hostent *gethostent(void); | ||
554 | |||
555 | static char RPCDB[] = "/etc/rpc"; | ||
556 | |||
557 | diff --git a/src/lib/win_glue.c b/src/lib/win_glue.c | ||
558 | index d650cc3..011acda 100644 | ||
559 | --- a/src/lib/win_glue.c | ||
560 | +++ b/src/lib/win_glue.c | ||
561 | @@ -6,7 +6,7 @@ | ||
562 | #include "asn1_err.h" | ||
563 | #include "kdb5_err.h" | ||
564 | #include "profile.h" | ||
565 | -extern void krb5_stdcc_shutdown(); | ||
566 | +extern void krb5_stdcc_shutdown(void); | ||
567 | #endif | ||
568 | #ifdef GSSAPI | ||
569 | #include "gssapi/generic/gssapi_err_generic.h" | ||
570 | @@ -233,7 +233,7 @@ static int CallVersionServer(app_title, app_version, app_ini, code_cover) | ||
571 | #endif | ||
572 | |||
573 | #ifdef TIMEBOMB | ||
574 | -static krb5_error_code do_timebomb() | ||
575 | +static krb5_error_code do_timebomb(void) | ||
576 | { | ||
577 | char buf[1024]; | ||
578 | long timeleft; | ||
579 | @@ -276,7 +276,7 @@ static krb5_error_code do_timebomb() | ||
580 | * doesn't allow you to make messaging calls from LibMain. So, we now | ||
581 | * do the timebomb/version server stuff from krb5_init_context(). | ||
582 | */ | ||
583 | -krb5_error_code krb5_vercheck() | ||
584 | +krb5_error_code krb5_vercheck(void) | ||
585 | { | ||
586 | static int verchecked = 0; | ||
587 | if (verchecked) | ||
588 | @@ -314,7 +314,7 @@ krb5_error_code krb5_vercheck() | ||
589 | |||
590 | static HINSTANCE hlibinstance; | ||
591 | |||
592 | -HINSTANCE get_lib_instance() | ||
593 | +HINSTANCE get_lib_instance(void) | ||
594 | { | ||
595 | return hlibinstance; | ||
596 | } | ||
597 | diff --git a/src/plugins/kdb/db2/kdb_db2.c b/src/plugins/kdb/db2/kdb_db2.c | ||
598 | index 2c163d9..381228e 100644 | ||
599 | --- a/src/plugins/kdb/db2/kdb_db2.c | ||
600 | +++ b/src/plugins/kdb/db2/kdb_db2.c | ||
601 | @@ -1165,13 +1165,13 @@ krb5_db2_set_lockmode(krb5_context context, krb5_boolean mode) | ||
602 | * DAL API functions | ||
603 | */ | ||
604 | krb5_error_code | ||
605 | -krb5_db2_lib_init() | ||
606 | +krb5_db2_lib_init(void) | ||
607 | { | ||
608 | return 0; | ||
609 | } | ||
610 | |||
611 | krb5_error_code | ||
612 | -krb5_db2_lib_cleanup() | ||
613 | +krb5_db2_lib_cleanup(void) | ||
614 | { | ||
615 | /* right now, no cleanup required */ | ||
616 | return 0; | ||
617 | diff --git a/src/plugins/kdb/db2/libdb2/hash/dbm.c b/src/plugins/kdb/db2/libdb2/hash/dbm.c | ||
618 | index 2dca256..8e23d4c 100644 | ||
619 | --- a/src/plugins/kdb/db2/libdb2/hash/dbm.c | ||
620 | +++ b/src/plugins/kdb/db2/libdb2/hash/dbm.c | ||
621 | @@ -95,7 +95,7 @@ kdb2_fetch(datum key) | ||
622 | } | ||
623 | |||
624 | datum | ||
625 | -kdb2_firstkey() | ||
626 | +kdb2_firstkey(void) | ||
627 | { | ||
628 | datum item; | ||
629 | |||
630 | diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c | ||
631 | index cee4b7b..5e77d5e 100644 | ||
632 | --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c | ||
633 | +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c | ||
634 | @@ -314,13 +314,13 @@ krb5_ldap_rebind(krb5_ldap_context *ldap_context, | ||
635 | * DAL API functions | ||
636 | */ | ||
637 | krb5_error_code | ||
638 | -krb5_ldap_lib_init() | ||
639 | +krb5_ldap_lib_init(void) | ||
640 | { | ||
641 | return 0; | ||
642 | } | ||
643 | |||
644 | krb5_error_code | ||
645 | -krb5_ldap_lib_cleanup() | ||
646 | +krb5_ldap_lib_cleanup(void) | ||
647 | { | ||
648 | /* right now, no cleanup required */ | ||
649 | return 0; | ||
650 | diff --git a/src/tests/threads/gss-perf.c b/src/tests/threads/gss-perf.c | ||
651 | index f3630c2..0ca6d84 100644 | ||
652 | --- a/src/tests/threads/gss-perf.c | ||
653 | +++ b/src/tests/threads/gss-perf.c | ||
654 | @@ -78,7 +78,7 @@ static void usage (void) __attribute__((noreturn)); | ||
655 | static void set_target (char *); | ||
656 | |||
657 | static void | ||
658 | -usage () | ||
659 | +usage (void) | ||
660 | { | ||
661 | fprintf (stderr, "usage: %s [ options ] service-name\n", prog); | ||
662 | fprintf (stderr, " service-name\tGSSAPI host-based service name (e.g., 'host@FQDN')\n"); | ||
663 | @@ -249,7 +249,7 @@ do_accept (gss_buffer_desc *msg, int iter) | ||
664 | } | ||
665 | |||
666 | static gss_buffer_desc | ||
667 | -do_init () | ||
668 | +do_init (void) | ||
669 | { | ||
670 | OM_uint32 maj_stat, min_stat; | ||
671 | gss_ctx_id_t ctx = GSS_C_NO_CONTEXT; | ||
672 | diff --git a/src/tests/threads/init_ctx.c b/src/tests/threads/init_ctx.c | ||
673 | index 42619a9..dc3d417 100644 | ||
674 | --- a/src/tests/threads/init_ctx.c | ||
675 | +++ b/src/tests/threads/init_ctx.c | ||
676 | @@ -57,7 +57,7 @@ static int do_pause; | ||
677 | static void usage (void) __attribute__((noreturn)); | ||
678 | |||
679 | static void | ||
680 | -usage () | ||
681 | +usage (void) | ||
682 | { | ||
683 | fprintf (stderr, "usage: %s [ options ]\n", prog); | ||
684 | fprintf (stderr, "options:\n"); | ||
685 | diff --git a/src/tests/threads/profread.c b/src/tests/threads/profread.c | ||
686 | index be28ba4..69bdb05 100644 | ||
687 | --- a/src/tests/threads/profread.c | ||
688 | +++ b/src/tests/threads/profread.c | ||
689 | @@ -59,7 +59,7 @@ static int do_pause; | ||
690 | static void usage (void) __attribute__((noreturn)); | ||
691 | |||
692 | static void | ||
693 | -usage () | ||
694 | +usage (void) | ||
695 | { | ||
696 | fprintf (stderr, "usage: %s [ options ]\n", prog); | ||
697 | fprintf (stderr, "options:\n"); | ||
698 | diff --git a/src/tests/threads/t_rcache.c b/src/tests/threads/t_rcache.c | ||
699 | index 07c45cc..8121429 100644 | ||
700 | --- a/src/tests/threads/t_rcache.c | ||
701 | +++ b/src/tests/threads/t_rcache.c | ||
702 | @@ -51,7 +51,7 @@ int n_threads = DEFAULT_N_THREADS; | ||
703 | int interval = DEFAULT_INTERVAL; | ||
704 | int *ip; | ||
705 | |||
706 | -static void wait_for_tick () | ||
707 | +static void wait_for_tick (void) | ||
708 | { | ||
709 | time_t now, next; | ||
710 | now = time(0); | ||
711 | diff --git a/src/util/et/com_err.c b/src/util/et/com_err.c | ||
712 | index c1e3be7..2e74a4f 100644 | ||
713 | --- a/src/util/et/com_err.c | ||
714 | +++ b/src/util/et/com_err.c | ||
715 | @@ -35,7 +35,7 @@ static /*@null@*/ et_old_error_hook_func com_err_hook = 0; | ||
716 | k5_mutex_t com_err_hook_lock = K5_MUTEX_PARTIAL_INITIALIZER; | ||
717 | |||
718 | #if defined(_WIN32) | ||
719 | -BOOL isGuiApp() { | ||
720 | +BOOL isGuiApp(void) { | ||
721 | DWORD mypid; | ||
722 | HANDLE myprocess; | ||
723 | mypid = GetCurrentProcessId(); | ||
724 | @@ -161,7 +161,7 @@ et_old_error_hook_func set_com_err_hook (et_old_error_hook_func new_proc) | ||
725 | return x; | ||
726 | } | ||
727 | |||
728 | -et_old_error_hook_func reset_com_err_hook () | ||
729 | +et_old_error_hook_func reset_com_err_hook (void) | ||
730 | { | ||
731 | et_old_error_hook_func x; | ||
732 | |||
733 | diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c | ||
734 | index 13ad3af..94445a9 100644 | ||
735 | --- a/src/util/et/error_message.c | ||
736 | +++ b/src/util/et/error_message.c | ||
737 | @@ -303,7 +303,7 @@ remove_error_table(const struct error_table *et) | ||
738 | return ENOENT; | ||
739 | } | ||
740 | |||
741 | -int com_err_finish_init() | ||
742 | +int com_err_finish_init(void) | ||
743 | { | ||
744 | return CALL_INIT_FUNCTION(com_err_initialize); | ||
745 | } | ||
746 | diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c | ||
747 | index aa951df..c10a368 100644 | ||
748 | --- a/src/util/profile/prof_file.c | ||
749 | +++ b/src/util/profile/prof_file.c | ||
750 | @@ -509,11 +509,11 @@ void profile_dereference_data_locked(prf_data_t data) | ||
751 | profile_free_file_data(data); | ||
752 | } | ||
753 | |||
754 | -void profile_lock_global() | ||
755 | +void profile_lock_global(void) | ||
756 | { | ||
757 | k5_mutex_lock(&g_shared_trees_mutex); | ||
758 | } | ||
759 | -void profile_unlock_global() | ||
760 | +void profile_unlock_global(void) | ||
761 | { | ||
762 | k5_mutex_unlock(&g_shared_trees_mutex); | ||
763 | } | ||
764 | diff --git a/src/util/support/secure_getenv.c b/src/util/support/secure_getenv.c | ||
765 | index 6df0591..c9b34b6 100644 | ||
766 | --- a/src/util/support/secure_getenv.c | ||
767 | +++ b/src/util/support/secure_getenv.c | ||
768 | @@ -68,7 +68,7 @@ static int elevated_privilege = 0; | ||
769 | MAKE_INIT_FUNCTION(k5_secure_getenv_init); | ||
770 | |||
771 | int | ||
772 | -k5_secure_getenv_init() | ||
773 | +k5_secure_getenv_init(void) | ||
774 | { | ||
775 | int saved_errno = errno; | ||
776 | |||
777 | diff --git a/src/windows/include/leashwin.h b/src/windows/include/leashwin.h | ||
778 | index 08b9c7d..c85e6df 100644 | ||
779 | --- a/src/windows/include/leashwin.h | ||
780 | +++ b/src/windows/include/leashwin.h | ||
781 | @@ -160,51 +160,51 @@ void Leash_reset_defaults(void); | ||
782 | #define GOOD_TICKETS 1 | ||
783 | |||
784 | /* Leash Configuration functions - alters Current User Registry */ | ||
785 | -DWORD Leash_get_default_lifetime(); | ||
786 | +DWORD Leash_get_default_lifetime(void); | ||
787 | DWORD Leash_set_default_lifetime(DWORD minutes); | ||
788 | -DWORD Leash_reset_default_lifetime(); | ||
789 | -DWORD Leash_get_default_renew_till(); | ||
790 | +DWORD Leash_reset_default_lifetime(void); | ||
791 | +DWORD Leash_get_default_renew_till(void); | ||
792 | DWORD Leash_set_default_renew_till(DWORD minutes); | ||
793 | -DWORD Leash_reset_default_renew_till(); | ||
794 | -DWORD Leash_get_default_renewable(); | ||
795 | +DWORD Leash_reset_default_renew_till(void); | ||
796 | +DWORD Leash_get_default_renewable(void); | ||
797 | DWORD Leash_set_default_renewable(DWORD onoff); | ||
798 | -DWORD Leash_reset_default_renewable(); | ||
799 | -DWORD Leash_get_default_forwardable(); | ||
800 | +DWORD Leash_reset_default_renewable(void); | ||
801 | +DWORD Leash_get_default_forwardable(void); | ||
802 | DWORD Leash_set_default_forwardable(DWORD onoff); | ||
803 | -DWORD Leash_reset_default_forwardable(); | ||
804 | -DWORD Leash_get_default_noaddresses(); | ||
805 | +DWORD Leash_reset_default_forwardable(void); | ||
806 | +DWORD Leash_get_default_noaddresses(void); | ||
807 | DWORD Leash_set_default_noaddresses(DWORD onoff); | ||
808 | -DWORD Leash_reset_default_noaddresses(); | ||
809 | -DWORD Leash_get_default_proxiable(); | ||
810 | +DWORD Leash_reset_default_noaddresses(void); | ||
811 | +DWORD Leash_get_default_proxiable(void); | ||
812 | DWORD Leash_set_default_proxiable(DWORD onoff); | ||
813 | -DWORD Leash_reset_default_proxiable(); | ||
814 | -DWORD Leash_get_default_publicip(); | ||
815 | +DWORD Leash_reset_default_proxiable(void); | ||
816 | +DWORD Leash_get_default_publicip(void); | ||
817 | DWORD Leash_set_default_publicip(DWORD ipv4addr); | ||
818 | -DWORD Leash_reset_default_publicip(); | ||
819 | -DWORD Leash_get_hide_kinit_options(); | ||
820 | +DWORD Leash_reset_default_publicip(void); | ||
821 | +DWORD Leash_get_hide_kinit_options(void); | ||
822 | DWORD Leash_set_hide_kinit_options(DWORD onoff); | ||
823 | -DWORD Leash_reset_hide_kinit_options(); | ||
824 | -DWORD Leash_get_default_life_min(); | ||
825 | +DWORD Leash_reset_hide_kinit_options(void); | ||
826 | +DWORD Leash_get_default_life_min(void); | ||
827 | DWORD Leash_set_default_life_min(DWORD minutes); | ||
828 | -DWORD Leash_reset_default_life_min(); | ||
829 | -DWORD Leash_get_default_life_max(); | ||
830 | +DWORD Leash_reset_default_life_min(void); | ||
831 | +DWORD Leash_get_default_life_max(void); | ||
832 | DWORD Leash_set_default_life_max(DWORD minutes); | ||
833 | -DWORD Leash_reset_default_life_max(); | ||
834 | -DWORD Leash_get_default_renew_min(); | ||
835 | +DWORD Leash_reset_default_life_max(void); | ||
836 | +DWORD Leash_get_default_renew_min(void); | ||
837 | DWORD Leash_set_default_renew_min(DWORD minutes); | ||
838 | -DWORD Leash_reset_default_renew_min(); | ||
839 | -DWORD Leash_get_default_renew_max(); | ||
840 | +DWORD Leash_reset_default_renew_min(void); | ||
841 | +DWORD Leash_get_default_renew_max(void); | ||
842 | DWORD Leash_set_default_renew_max(DWORD minutes); | ||
843 | -DWORD Leash_reset_default_renew_max(); | ||
844 | -DWORD Leash_get_default_uppercaserealm(); | ||
845 | +DWORD Leash_reset_default_renew_max(void); | ||
846 | +DWORD Leash_get_default_uppercaserealm(void); | ||
847 | DWORD Leash_set_default_uppercaserealm(DWORD onoff); | ||
848 | -DWORD Leash_reset_default_uppercaserealm(); | ||
849 | -DWORD Leash_get_default_mslsa_import(); | ||
850 | +DWORD Leash_reset_default_uppercaserealm(void); | ||
851 | +DWORD Leash_get_default_mslsa_import(void); | ||
852 | DWORD Leash_set_default_mslsa_import(DWORD onoffmatch); | ||
853 | -DWORD Leash_reset_default_mslsa_import(); | ||
854 | -DWORD Leash_get_default_preserve_kinit_settings(); | ||
855 | +DWORD Leash_reset_default_mslsa_import(void); | ||
856 | +DWORD Leash_get_default_preserve_kinit_settings(void); | ||
857 | DWORD Leash_set_default_preserve_kinit_settings(DWORD onoff); | ||
858 | -DWORD Leash_reset_default_preserve_kinit_settings(); | ||
859 | +DWORD Leash_reset_default_preserve_kinit_settings(void); | ||
860 | #ifdef __cplusplus | ||
861 | } | ||
862 | #endif | ||
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/0002-Avoid-strict-prototype-compiler-errors.patch b/meta-oe/recipes-connectivity/krb5/krb5/0002-Avoid-strict-prototype-compiler-errors.patch new file mode 100644 index 0000000000..63072c790c --- /dev/null +++ b/meta-oe/recipes-connectivity/krb5/krb5/0002-Avoid-strict-prototype-compiler-errors.patch | |||
@@ -0,0 +1,379 @@ | |||
1 | From 422c63a716a55da5c750396c0f215b5be9e060b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Steffen=20Kie=C3=9F?= | ||
3 | <steffen.kiess@cis.iti.uni-stuttgart.de> | ||
4 | Date: Tue, 13 Feb 2024 18:39:27 +0100 | ||
5 | Subject: [PATCH 2/2] Avoid strict-prototype compiler errors | ||
6 | |||
7 | Commit 4b9d7f7c107f01a61600fddcd8cde3812d0366a2 added the | ||
8 | -Werror=strict-prototypes parameter to the build process, but left | ||
9 | behind 28 function definitions using "()" instead of "(void)". Most | ||
10 | of these definitions could not cause compiler errors for various | ||
11 | reasons (such as an accompanying prototype), but a few could cause | ||
12 | errors in gcc depending on the build configuration. | ||
13 | |||
14 | For consistency and safety, add "(void)" to all 28 definitions. | ||
15 | |||
16 | [ghudson@mit.edu: rewrote commit message] | ||
17 | |||
18 | Upstream-Status: Backport [https://github.com/krb5/krb5/commit/3ae9244cd021a75eba909d872a92c25db490714d] | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | src/clients/kcpytkt/kcpytkt.c | 2 +- | ||
22 | src/clients/kdeltkt/kdeltkt.c | 2 +- | ||
23 | src/clients/kinit/kinit.c | 4 ++-- | ||
24 | src/clients/kinit/kinit_kdb.c | 2 +- | ||
25 | src/clients/klist/klist.c | 4 ++-- | ||
26 | src/kadmin/cli/kadmin.c | 2 +- | ||
27 | src/kadmin/dbutil/kdb5_util.c | 4 ++-- | ||
28 | src/kdc/main.c | 2 +- | ||
29 | src/kprop/kpropd.c | 4 ++-- | ||
30 | src/lib/crypto/builtin/enc_provider/aes.c | 2 +- | ||
31 | src/lib/crypto/openssl/hmac.c | 2 +- | ||
32 | src/lib/krb5/ccache/t_memory.c | 4 ++-- | ||
33 | src/lib/krb5/ccache/t_stdio.c | 4 ++-- | ||
34 | src/plugins/kdb/db2/libdb2/btree/bt_debug.c | 2 +- | ||
35 | src/plugins/kdb/db2/libdb2/btree/bt_open.c | 4 ++-- | ||
36 | src/plugins/kdb/db2/libdb2/hash/dbm.c | 2 +- | ||
37 | src/plugins/kdb/db2/libdb2/test/btree.tests/main.c | 2 +- | ||
38 | src/plugins/kdb/db2/libdb2/test/dbtest.c | 2 +- | ||
39 | src/plugins/preauth/pkinit/pkinit_crypto_openssl.c | 2 +- | ||
40 | src/plugins/tls/k5tls/openssl.c | 2 +- | ||
41 | src/tests/asn.1/make-vectors.c | 2 +- | ||
42 | 21 files changed, 28 insertions(+), 28 deletions(-) | ||
43 | |||
44 | diff --git a/src/clients/kcpytkt/kcpytkt.c b/src/clients/kcpytkt/kcpytkt.c | ||
45 | index 0b88022..f1d50e5 100644 | ||
46 | --- a/src/clients/kcpytkt/kcpytkt.c | ||
47 | +++ b/src/clients/kcpytkt/kcpytkt.c | ||
48 | @@ -10,7 +10,7 @@ static char *prog; | ||
49 | static int quiet = 0; | ||
50 | |||
51 | static void | ||
52 | -xusage() | ||
53 | +xusage(void) | ||
54 | { | ||
55 | fprintf(stderr, "xusage: %s [-c from_ccache] [-e etype] [-f flags] " | ||
56 | "dest_ccache service1 service2 ...\n", prog); | ||
57 | diff --git a/src/clients/kdeltkt/kdeltkt.c b/src/clients/kdeltkt/kdeltkt.c | ||
58 | index cd0bf63..66a32a8 100644 | ||
59 | --- a/src/clients/kdeltkt/kdeltkt.c | ||
60 | +++ b/src/clients/kdeltkt/kdeltkt.c | ||
61 | @@ -10,7 +10,7 @@ static char *prog; | ||
62 | static int quiet = 0; | ||
63 | |||
64 | static void | ||
65 | -xusage() | ||
66 | +xusage(void) | ||
67 | { | ||
68 | fprintf(stderr, "xusage: %s [-c ccache] [-e etype] [-f flags] service1 " | ||
69 | "service2 ...\n", prog); | ||
70 | diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c | ||
71 | index 7a33ffa..b27b723 100644 | ||
72 | --- a/src/clients/kinit/kinit.c | ||
73 | +++ b/src/clients/kinit/kinit.c | ||
74 | @@ -55,7 +55,7 @@ get_name_from_os(void) | ||
75 | #else /* HAVE_PWD_H */ | ||
76 | #ifdef _WIN32 | ||
77 | static char * | ||
78 | -get_name_from_os() | ||
79 | +get_name_from_os(void) | ||
80 | { | ||
81 | static char name[1024]; | ||
82 | DWORD name_size = sizeof(name); | ||
83 | @@ -69,7 +69,7 @@ get_name_from_os() | ||
84 | } | ||
85 | #else /* _WIN32 */ | ||
86 | static char * | ||
87 | -get_name_from_os() | ||
88 | +get_name_from_os(void) | ||
89 | { | ||
90 | return NULL; | ||
91 | } | ||
92 | diff --git a/src/clients/kinit/kinit_kdb.c b/src/clients/kinit/kinit_kdb.c | ||
93 | index fbd174b..4e7cd50 100644 | ||
94 | --- a/src/clients/kinit/kinit_kdb.c | ||
95 | +++ b/src/clients/kinit/kinit_kdb.c | ||
96 | @@ -69,7 +69,7 @@ kinit_kdb_init(krb5_context *pcontext, char *realm) | ||
97 | } | ||
98 | |||
99 | void | ||
100 | -kinit_kdb_fini() | ||
101 | +kinit_kdb_fini(void) | ||
102 | { | ||
103 | kadm5_destroy(server_handle); | ||
104 | } | ||
105 | diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c | ||
106 | index c797b16..27cf0ee 100644 | ||
107 | --- a/src/clients/klist/klist.c | ||
108 | +++ b/src/clients/klist/klist.c | ||
109 | @@ -359,7 +359,7 @@ do_keytab(const char *name) | ||
110 | } | ||
111 | |||
112 | static void | ||
113 | -list_all_ccaches() | ||
114 | +list_all_ccaches(void) | ||
115 | { | ||
116 | krb5_error_code ret; | ||
117 | krb5_ccache cache; | ||
118 | @@ -451,7 +451,7 @@ show_all_ccaches(void) | ||
119 | } | ||
120 | |||
121 | static void | ||
122 | -do_ccache() | ||
123 | +do_ccache(void) | ||
124 | { | ||
125 | krb5_error_code ret; | ||
126 | krb5_ccache cache; | ||
127 | diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c | ||
128 | index 23b64b0..c1256f7 100644 | ||
129 | --- a/src/kadmin/cli/kadmin.c | ||
130 | +++ b/src/kadmin/cli/kadmin.c | ||
131 | @@ -607,7 +607,7 @@ kadmin_startup(int argc, char *argv[], char **request_out, char ***args_out) | ||
132 | } | ||
133 | |||
134 | int | ||
135 | -quit() | ||
136 | +quit(void) | ||
137 | { | ||
138 | kadm5_ret_t retval; | ||
139 | |||
140 | diff --git a/src/kadmin/dbutil/kdb5_util.c b/src/kadmin/dbutil/kdb5_util.c | ||
141 | index 3a07fd5..187428e 100644 | ||
142 | --- a/src/kadmin/dbutil/kdb5_util.c | ||
143 | +++ b/src/kadmin/dbutil/kdb5_util.c | ||
144 | @@ -367,7 +367,7 @@ main(int argc, char *argv[]) | ||
145 | * program is run). | ||
146 | */ | ||
147 | static int | ||
148 | -open_db_and_mkey() | ||
149 | +open_db_and_mkey(void) | ||
150 | { | ||
151 | krb5_error_code retval; | ||
152 | krb5_data scratch, pwd, seed; | ||
153 | @@ -489,7 +489,7 @@ open_db_and_mkey() | ||
154 | #endif | ||
155 | |||
156 | int | ||
157 | -quit() | ||
158 | +quit(void) | ||
159 | { | ||
160 | krb5_error_code retval; | ||
161 | static krb5_boolean finished = 0; | ||
162 | diff --git a/src/kdc/main.c b/src/kdc/main.c | ||
163 | index bfdfef5..ad1d1bf 100644 | ||
164 | --- a/src/kdc/main.c | ||
165 | +++ b/src/kdc/main.c | ||
166 | @@ -854,7 +854,7 @@ write_pid_file(const char *path) | ||
167 | } | ||
168 | |||
169 | static void | ||
170 | -finish_realms() | ||
171 | +finish_realms(void) | ||
172 | { | ||
173 | int i; | ||
174 | |||
175 | diff --git a/src/kprop/kpropd.c b/src/kprop/kpropd.c | ||
176 | index 1b530fc..b11f3a9 100644 | ||
177 | --- a/src/kprop/kpropd.c | ||
178 | +++ b/src/kprop/kpropd.c | ||
179 | @@ -376,7 +376,7 @@ get_wildcard_addr(struct addrinfo **res) | ||
180 | } | ||
181 | |||
182 | static void | ||
183 | -do_standalone() | ||
184 | +do_standalone(void) | ||
185 | { | ||
186 | struct sockaddr_in frominet; | ||
187 | struct addrinfo *res; | ||
188 | @@ -630,7 +630,7 @@ full_resync(CLIENT *clnt) | ||
189 | * Returns non-zero on failure due to errors. | ||
190 | */ | ||
191 | krb5_error_code | ||
192 | -do_iprop() | ||
193 | +do_iprop(void) | ||
194 | { | ||
195 | kadm5_ret_t retval; | ||
196 | krb5_principal iprop_svc_principal = NULL; | ||
197 | diff --git a/src/lib/crypto/builtin/enc_provider/aes.c b/src/lib/crypto/builtin/enc_provider/aes.c | ||
198 | index 7fa9449..39e2a84 100644 | ||
199 | --- a/src/lib/crypto/builtin/enc_provider/aes.c | ||
200 | +++ b/src/lib/crypto/builtin/enc_provider/aes.c | ||
201 | @@ -69,7 +69,7 @@ void k5_iEnc256_CBC(struct aes_data *data); | ||
202 | void k5_iDec256_CBC(struct aes_data *data); | ||
203 | |||
204 | static krb5_boolean | ||
205 | -aesni_supported_by_cpu() | ||
206 | +aesni_supported_by_cpu(void) | ||
207 | { | ||
208 | unsigned int a, b, c, d; | ||
209 | |||
210 | diff --git a/src/lib/crypto/openssl/hmac.c b/src/lib/crypto/openssl/hmac.c | ||
211 | index bf12b8d..799d700 100644 | ||
212 | --- a/src/lib/crypto/openssl/hmac.c | ||
213 | +++ b/src/lib/crypto/openssl/hmac.c | ||
214 | @@ -70,7 +70,7 @@ | ||
215 | |||
216 | #define HMAC_CTX_new compat_hmac_ctx_new | ||
217 | static HMAC_CTX * | ||
218 | -compat_hmac_ctx_new() | ||
219 | +compat_hmac_ctx_new(void) | ||
220 | { | ||
221 | HMAC_CTX *ctx; | ||
222 | |||
223 | diff --git a/src/lib/krb5/ccache/t_memory.c b/src/lib/krb5/ccache/t_memory.c | ||
224 | index 6d103a0..0f94e82 100644 | ||
225 | --- a/src/lib/krb5/ccache/t_memory.c | ||
226 | +++ b/src/lib/krb5/ccache/t_memory.c | ||
227 | @@ -85,7 +85,7 @@ krb5_creds test_creds = { | ||
228 | }; | ||
229 | |||
230 | void | ||
231 | -init_test_cred() | ||
232 | +init_test_cred(void) | ||
233 | { | ||
234 | test_creds.client = (krb5_principal) malloc(sizeof(krb5_data *)*3); | ||
235 | test_creds.client[0] = &client1; | ||
236 | @@ -104,7 +104,7 @@ init_test_cred() | ||
237 | }; | ||
238 | |||
239 | void | ||
240 | -mcc_test() | ||
241 | +mcc_test(void) | ||
242 | { | ||
243 | krb5_ccache id; | ||
244 | krb5_creds creds; | ||
245 | diff --git a/src/lib/krb5/ccache/t_stdio.c b/src/lib/krb5/ccache/t_stdio.c | ||
246 | index 15185e3..06a9c2d 100644 | ||
247 | --- a/src/lib/krb5/ccache/t_stdio.c | ||
248 | +++ b/src/lib/krb5/ccache/t_stdio.c | ||
249 | @@ -98,7 +98,7 @@ krb5_creds test_creds = { | ||
250 | }; | ||
251 | |||
252 | void | ||
253 | -init_test_cred() | ||
254 | +init_test_cred(void) | ||
255 | { | ||
256 | test_creds.client = (krb5_principal) malloc(sizeof(krb5_data *)*3); | ||
257 | test_creds.client[0] = &client1; | ||
258 | @@ -118,7 +118,7 @@ init_test_cred() | ||
259 | |||
260 | int flags = 0; | ||
261 | void | ||
262 | -scc_test() | ||
263 | +scc_test(void) | ||
264 | { | ||
265 | krb5_ccache id; | ||
266 | krb5_creds creds; | ||
267 | diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_debug.c b/src/plugins/kdb/db2/libdb2/btree/bt_debug.c | ||
268 | index bc71076..5a955e0 100644 | ||
269 | --- a/src/plugins/kdb/db2/libdb2/btree/bt_debug.c | ||
270 | +++ b/src/plugins/kdb/db2/libdb2/btree/bt_debug.c | ||
271 | @@ -56,7 +56,7 @@ static FILE *tracefp; | ||
272 | * initialize debugging. | ||
273 | */ | ||
274 | static void | ||
275 | -__bt_dinit() | ||
276 | +__bt_dinit(void) | ||
277 | { | ||
278 | static int first = 1; | ||
279 | |||
280 | diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_open.c b/src/plugins/kdb/db2/libdb2/btree/bt_open.c | ||
281 | index 0bb19d7..56bab19 100644 | ||
282 | --- a/src/plugins/kdb/db2/libdb2/btree/bt_open.c | ||
283 | +++ b/src/plugins/kdb/db2/libdb2/btree/bt_open.c | ||
284 | @@ -390,7 +390,7 @@ nroot(BTREE *t) | ||
285 | } | ||
286 | |||
287 | static int | ||
288 | -tmp() | ||
289 | +tmp(void) | ||
290 | { | ||
291 | #ifdef SIG_BLOCK | ||
292 | sigset_t set, oset; | ||
293 | @@ -437,7 +437,7 @@ tmp() | ||
294 | } | ||
295 | |||
296 | static int | ||
297 | -byteorder() | ||
298 | +byteorder(void) | ||
299 | { | ||
300 | u_int32_t x; | ||
301 | u_char *p; | ||
302 | diff --git a/src/plugins/kdb/db2/libdb2/hash/dbm.c b/src/plugins/kdb/db2/libdb2/hash/dbm.c | ||
303 | index 8e23d4c..6e5e96b 100644 | ||
304 | --- a/src/plugins/kdb/db2/libdb2/hash/dbm.c | ||
305 | +++ b/src/plugins/kdb/db2/libdb2/hash/dbm.c | ||
306 | @@ -143,7 +143,7 @@ kdb2_store(datum key, datum dat) | ||
307 | } | ||
308 | |||
309 | static void | ||
310 | -no_open_db() | ||
311 | +no_open_db(void) | ||
312 | { | ||
313 | (void)fprintf(stderr, "dbm: no open database.\n"); | ||
314 | } | ||
315 | diff --git a/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c b/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c | ||
316 | index 088f903..eec843d 100644 | ||
317 | --- a/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c | ||
318 | +++ b/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c | ||
319 | @@ -908,7 +908,7 @@ keydata(key, data) | ||
320 | } | ||
321 | |||
322 | void | ||
323 | -usage() | ||
324 | +usage(void) | ||
325 | { | ||
326 | (void)fprintf(stderr, | ||
327 | "usage: %s [-bdluw] [-c cache] [-i file] [-p page] [file]\n", | ||
328 | diff --git a/src/plugins/kdb/db2/libdb2/test/dbtest.c b/src/plugins/kdb/db2/libdb2/test/dbtest.c | ||
329 | index 04bf34b..a2866b4 100644 | ||
330 | --- a/src/plugins/kdb/db2/libdb2/test/dbtest.c | ||
331 | +++ b/src/plugins/kdb/db2/libdb2/test/dbtest.c | ||
332 | @@ -792,7 +792,7 @@ xmalloc(char *text, size_t len) | ||
333 | } | ||
334 | |||
335 | void | ||
336 | -usage() | ||
337 | +usage(void) | ||
338 | { | ||
339 | (void)fprintf(stderr, | ||
340 | "usage: dbtest [-l] [-f file] [-i info] [-o file] type script\n"); | ||
341 | diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c | ||
342 | index 4c81256..4a8b6d9 100644 | ||
343 | --- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c | ||
344 | +++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c | ||
345 | @@ -3075,7 +3075,7 @@ cleanup: | ||
346 | } | ||
347 | |||
348 | int | ||
349 | -pkinit_openssl_init() | ||
350 | +pkinit_openssl_init(void) | ||
351 | { | ||
352 | /* Initialize OpenSSL. */ | ||
353 | ERR_load_crypto_strings(); | ||
354 | diff --git a/src/plugins/tls/k5tls/openssl.c b/src/plugins/tls/k5tls/openssl.c | ||
355 | index 99fda7f..aab67c0 100644 | ||
356 | --- a/src/plugins/tls/k5tls/openssl.c | ||
357 | +++ b/src/plugins/tls/k5tls/openssl.c | ||
358 | @@ -49,7 +49,7 @@ static int ex_handle_id = -1; | ||
359 | MAKE_INIT_FUNCTION(init_openssl); | ||
360 | |||
361 | int | ||
362 | -init_openssl() | ||
363 | +init_openssl(void) | ||
364 | { | ||
365 | SSL_library_init(); | ||
366 | SSL_load_error_strings(); | ||
367 | diff --git a/src/tests/asn.1/make-vectors.c b/src/tests/asn.1/make-vectors.c | ||
368 | index 2fc8546..6f2b7dd 100644 | ||
369 | --- a/src/tests/asn.1/make-vectors.c | ||
370 | +++ b/src/tests/asn.1/make-vectors.c | ||
371 | @@ -224,7 +224,7 @@ printbuf(void) | ||
372 | } | ||
373 | |||
374 | int | ||
375 | -main() | ||
376 | +main(void) | ||
377 | { | ||
378 | /* Initialize values which can't use static initializers. */ | ||
379 | asn_long2INTEGER(&otp_format, 2); /* Alphanumeric */ | ||
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb index 235157fb0c..e500749025 100644 --- a/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb +++ b/meta-oe/recipes-connectivity/krb5/krb5_1.21.3.bb | |||
@@ -22,6 +22,8 @@ SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" | |||
22 | SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ | 22 | SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ |
23 | file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \ | 23 | file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \ |
24 | file://0001-Eliminate-old-style-function-declarations.patch;patchdir=.. \ | 24 | file://0001-Eliminate-old-style-function-declarations.patch;patchdir=.. \ |
25 | file://0001-Fix-more-non-prototype-functions.patch;patchdir=.. \ | ||
26 | file://0002-Avoid-strict-prototype-compiler-errors.patch;patchdir=.. \ | ||
25 | file://crosscompile_nm.patch \ | 27 | file://crosscompile_nm.patch \ |
26 | file://etc/init.d/krb5-kdc \ | 28 | file://etc/init.d/krb5-kdc \ |
27 | file://etc/init.d/krb5-admin-server \ | 29 | file://etc/init.d/krb5-admin-server \ |