summaryrefslogtreecommitdiff
path: root/graphics/xart/patches/patch-aj
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/xart/patches/patch-aj')
-rw-r--r--graphics/xart/patches/patch-aj15
1 files changed, 12 insertions, 3 deletions
diff --git a/graphics/xart/patches/patch-aj b/graphics/xart/patches/patch-aj
index 9b401a5f6fd..6bcf0a014f2 100644
--- a/graphics/xart/patches/patch-aj
+++ b/graphics/xart/patches/patch-aj
@@ -1,6 +1,8 @@
-$NetBSD: patch-aj,v 1.2 2006/03/01 14:40:34 joerg Exp $
+$NetBSD: patch-aj,v 1.3 2014/09/25 10:58:02 jperkin Exp $
---- rw/libpnmrw.c.orig 2006-02-23 21:15:15.000000000 +0000
+Support strerror().
+
+--- rw/libpnmrw.c.orig 1996-06-25 08:50:42.000000000 +0000
+++ rw/libpnmrw.c
@@ -32,6 +32,7 @@
/* #define MSDOS */
@@ -10,7 +12,7 @@ $NetBSD: patch-aj,v 1.2 2006/03/01 14:40:34 joerg Exp $
#include <stdio.h>
#include "libpnmrw.h"
-@@ -128,12 +129,6 @@ pm_freearray(char **its, int rows)
+@@ -128,15 +129,13 @@ pm_freearray(char **its, int rows)
static void
pm_perror(char *reason)
{
@@ -22,4 +24,11 @@ $NetBSD: patch-aj,v 1.2 2006/03/01 14:40:34 joerg Exp $
- extern int errno;
char *e;
++#if defined(__STDC__) && !defined(MISSING_STRERROR)
++ e = strerror(errno);
++#else
e = sys_errlist[errno];
++#endif
+
+ if (reason != 0 && reason[0] != '\0')
+ fprintf(stderr, "%s: %s - %s\n", progname, reason, e);