git: 0dc57d1b220a - main - multimedia/mpeg_encode: include errno.h for errno

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

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

commit 0dc57d1b220a1e93045f1e92d94915193d3edcb8
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:44 +0000

    multimedia/mpeg_encode: include errno.h for errno
    
    errno must be accessed by a macro from errno.h.
---
 multimedia/mpeg_encode/Makefile               |  1 +
 multimedia/mpeg_encode/files/patch-libpnmrw.c | 18 ++++++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/multimedia/mpeg_encode/Makefile b/multimedia/mpeg_encode/Makefile
index 6f314de8cd4c..d65411bb870d 100644
--- a/multimedia/mpeg_encode/Makefile
+++ b/multimedia/mpeg_encode/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	mpeg_encode
 PORTVERSION=	1.5b
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	LOCAL/ahze
 DISTNAME=	${PKGNAME}-src
diff --git a/multimedia/mpeg_encode/files/patch-libpnmrw.c b/multimedia/mpeg_encode/files/patch-libpnmrw.c
index 5af9c672ec4a..5eada909fcc1 100644
--- a/multimedia/mpeg_encode/files/patch-libpnmrw.c
+++ b/multimedia/mpeg_encode/files/patch-libpnmrw.c
@@ -1,11 +1,21 @@
---- ./libpnmrw.c~	Thu Aug  1 08:52:14 1996
-+++ ./libpnmrw.c	Thu Aug  1 08:51:26 1996
-@@ -126,7 +126,9 @@
+--- ./libpnmrw.c.orig
++++ ./libpnmrw.c
+@@ -27,6 +27,7 @@
+ /* #define MSDOS */
+ #endif
+ 
++#include <errno.h>
+ #include <stdio.h>
+ #include "libpnmrw.h"
+ 
+@@ -126,8 +127,10 @@
    pm_perror( reason )
  char* reason;
  {
 +#ifndef __FreeBSD__
    extern char* sys_errlist[];
-+#endif
    extern int errno;
++#endif
    char* e;
+ 
+   e = sys_errlist[errno];