mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-28 07:38:21 +02:00
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
|
Fix -Wimplicit-function-declaration errors with gcc 14.
|
||
|
|
||
|
Set `STDC_HEADERS` to include `stdio.h` and `stdlib.h`.
|
||
|
|
||
|
```
|
||
|
expr_parser.c: In function 'pamtester_expr_parser_hdlr':
|
||
|
expr_parser.c:87:31: error: implicit declaration of function 'strtol'; did you mean 'strtok'? [-Wimplicit-function-declaration]
|
||
|
87 | val = strtol(token_val, &next_ptr, 10);
|
||
|
| ^~~~~~
|
||
|
| strtok
|
||
|
```
|
||
|
|
||
|
```
|
||
|
parse_opts.c: In function 'pamtester_parse_opts':
|
||
|
parse_opts.c:85:81: error: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
|
||
|
85 | sprintf(*err_msg, "Option \"%s\" may not be specified twice or more", opt->long_name);
|
||
|
| ^~~~~~~
|
||
|
parse_opts.c:51:1: note: include '<stdio.h>' or provide a declaration of 'sprintf'
|
||
|
50 | #include "parse_opts.h"
|
||
|
+++ |+#include <stdio.h>
|
||
|
```
|
||
|
|
||
|
--- pamtester-0.1.2-origin/configure
|
||
|
+++ pamtester-0.1.2/configure
|
||
|
@@ -20432,7 +20432,7 @@
|
||
|
}'
|
||
|
fi
|
||
|
|
||
|
-DEFS=-DHAVE_CONFIG_H
|
||
|
+DEFS="-DHAVE_CONFIG_H -DSTDC_HEADERS"
|
||
|
|
||
|
ac_libobjs=
|
||
|
ac_ltlibobjs=
|