mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-29 01:22:09 +02:00
Fix getenv/getopt and other function prototypes with gcc 15.
```
getopt.c:366:21: error: too many arguments to function 'getenv'; expected 0, have 1
366 | posixly_correct = getenv ("POSIXLY_CORRECT");
| ^~~~~~ ~~~~~~~~~~~~~~~~~
getopt.c:214:7: note: declared here
214 | char *getenv ();
| ^~~~~~
```
```
getopt.c:922:1: error: number of arguments doesn't match prototype
922 | {
| ^
In file included from getopt.c:113:
getopt.h:108:12: error: prototype declaration
108 | extern int getopt ();
| ^~~~~~
```
```
regex.c:3565:13: error: too many arguments to function 're_match_2_internal'; expected 0, have 8
3565 | val = re_match_2_internal (bufp, string1, size1, string2, size2,
| ^~~~~~~~~~~~~~~~~~~ ~~~~
regex.c:339:12: note: declared here
339 | static int re_match_2_internal ();
| ^~~~~~~~~~~~~~~~~~~
```
16 lines
621 B
Diff
16 lines
621 B
Diff
Patch-Source: https://src.fedoraproject.org/rpms/enscript/blob/9c673cf1082e06e133c14e9896b78a317b93359e/f/enscript-c23.patch
|
||
---
|
||
diff --git a/compat/regex.c b/compat/regex.c
|
||
index c6907f3..87f2840 100644
|
||
--- a/compat/regex.c
|
||
+++ b/compat/regex.c
|
||
@@ -336,7 +336,7 @@ typedef char boolean;
|
||
#define false 0
|
||
#define true 1
|
||
|
||
-static int re_match_2_internal ();
|
||
+static int re_match_2_internal (struct re_pattern_buffer*, const char*, int, const char*, int, int, struct re_registers*, int);
|
||
|
||
/* These are the command codes that appear in compiled regular
|
||
expressions. Some opcodes are followed by argument bytes. A
|