git: b8e225422def - main - misc/viz: include errno.h for errno

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 30 Sep 2024 22:15:18 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b8e225422defaecb12e4860000f97e08f9f5afe8

commit b8e225422defaecb12e4860000f97e08f9f5afe8
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-09-30 15:56:09 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-09-30 22:13:43 +0000

    misc/viz: include errno.h for errno
    
    errno must be accessed by a macro from errno.h.  This program was
    partially converted in it's initial commit, but the removal of errno
    declerations was incomplete.
---
 misc/viz/Makefile               |  2 +-
 misc/viz/files/patch-lists.c    | 13 +++++++++++++
 misc/viz/files/patch-loadfile.c | 13 +++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/misc/viz/Makefile b/misc/viz/Makefile
index 353a577576cc..38243420aef2 100644
--- a/misc/viz/Makefile
+++ b/misc/viz/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	viz
 PORTVERSION=	1.1.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	misc
 MASTER_SITES=	LOCAL/fenner
 
diff --git a/misc/viz/files/patch-lists.c b/misc/viz/files/patch-lists.c
new file mode 100644
index 000000000000..db88c0b0baf6
--- /dev/null
+++ b/misc/viz/files/patch-lists.c
@@ -0,0 +1,13 @@
+--- lists.c.orig
++++ lists.c
+@@ -6,10 +6,6 @@
+ 
+ #include "viz.h"
+ 
+-extern errno;
+-
+-extern char *malloc();
+-
+ void
+ printlist(level, list)
+ int level;
diff --git a/misc/viz/files/patch-loadfile.c b/misc/viz/files/patch-loadfile.c
new file mode 100644
index 000000000000..19309738ea8d
--- /dev/null
+++ b/misc/viz/files/patch-loadfile.c
@@ -0,0 +1,13 @@
+--- loadfile.c.orig
++++ loadfile.c
+@@ -1,9 +1,8 @@
++#include <errno.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/fcntl.h>
+-
+-extern errno;
+ 
+ char *loadfile(path)
+ char *path;