aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2023-06-25 20:50:25 +0000
committerCy Schubert <cy@FreeBSD.org>2023-06-25 20:53:27 +0000
commit98a8e60fca78cf8cd3c7e692aa41d4d807c6b52f (patch)
tree9072ec50bff796a3f17747228b533f31508fc4f1
parentef95161b3d1eaf5745e4c6400beec8dd71b06c40 (diff)
downloadports-98a8e60fca78cf8cd3c7e692aa41d4d807c6b52f.tar.gz
ports-98a8e60fca78cf8cd3c7e692aa41d4d807c6b52f.zip
sysutils/44bsd-more: Fix build with LLVM16
main.c:440:22: error: incompatible function pointer types passing 'int (void *, char *, size_t)' (aka 'int (void *, char *, unsigned long)') to parameter of type 'int (* _Nullable)(void *, char *, int)' [-Wincompatible-function-pointer-types] fd = fropen(DEFRC, str_read); ^~~~~~~~ MFH: 2023Q3 (cherry picked from commit 6bef86a7ad93c1c38df8c3266340796746e0aa32)
-rw-r--r--sysutils/44bsd-more/files/patch-main.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/sysutils/44bsd-more/files/patch-main.c b/sysutils/44bsd-more/files/patch-main.c
index a2110df1be9c..2fe1808c7c79 100644
--- a/sysutils/44bsd-more/files/patch-main.c
+++ b/sysutils/44bsd-more/files/patch-main.c
@@ -1,5 +1,5 @@
---- main.c.orig 2011-09-08 01:02:56.000000000 +0800
-+++ main.c 2011-09-08 01:17:47.000000000 +0800
+--- main.c.orig 2023-06-25 13:45:14.613216000 -0700
++++ main.c 2023-06-25 13:49:15.978996000 -0700
@@ -33,9 +33,9 @@
*/
@@ -12,18 +12,18 @@
Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
-@@ -68,6 +68,10 @@ static const char rcsid[] =
+@@ -68,6 +68,10 @@
#include "less.h"
#include "pathnames.h"
-+static int str_read(void *, char *, size_t);
++static int str_read(void *, char *, int);
+void rcfiles();
+void readrc(FILE *);
+
int ispipe;
char *current_file, *previous_file, *current_name, *next_name;
int any_display;
-@@ -214,6 +218,7 @@ edit(filename, force_open)
+@@ -214,6 +218,7 @@
/*
* Edit the next file in the command line list.
*/
@@ -31,7 +31,7 @@
next_file(n)
int n;
{
-@@ -281,7 +286,7 @@ main(argc, argv)
+@@ -281,7 +286,7 @@
* Process command line arguments and MORE environment arguments.
* Command line arguments override environment arguments.
*/
@@ -40,7 +40,7 @@
envargc = 2;
envargv[0] = "more";
envargv[2] = NULL;
-@@ -403,14 +408,14 @@ quit()
+@@ -403,14 +408,14 @@
* Read in from each of the three rc files - default, system, user.
* Calls handle_error() directly to report errors.
*/
@@ -57,7 +57,7 @@
/* The default builtin rc file */
if ((c = getenv("HOME")) &&
-@@ -480,6 +485,7 @@ use_builtin_defrc:
+@@ -480,6 +485,7 @@
* This really belongs in ncommand.c, but that file is already 33292 bytes
* long.
*/
@@ -65,7 +65,7 @@
readrc(fd)
FILE *fd;
{
-@@ -489,7 +495,7 @@ readrc(fd)
+@@ -489,7 +495,7 @@
buf = NULL;
strlenbuf = 0;
@@ -74,3 +74,12 @@
if (!len)
continue; /* ??? */
if (*bufptr == '#')
+@@ -527,7 +533,7 @@
+ str_read(cookie, buf, len)
+ void *cookie;
+ char *buf;
+- size_t len;
++ int len;
+ {
+ static char *curpos;
+ static int cooklen;