1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-22 21:20:31 -04:00
ports/multimedia/mpeg_encode/files/patch-libpnmrw.c
Brooks Davis 0dc57d1b22 multimedia/mpeg_encode: include errno.h for errno
errno must be accessed by a macro from errno.h.
2024-09-30 23:13:44 +01:00

21 lines
337 B
C

--- ./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[];
extern int errno;
+#endif
char* e;
e = sys_errlist[errno];