summaryrefslogtreecommitdiff
blob: 5a99c3e0fae19bedb9f6686286ec14af3df4d18e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- mpeg_encode.old/libpnmrw.c	2003-04-11 17:39:57.000000000 +0100
+++ mpeg_encode/libpnmrw.c	2003-04-11 17:43:01.000000000 +0100
@@ -34,6 +34,8 @@
 #include <string.h>
 #define rindex(s,c) strrchr(s,c)
 
+#include <errno.h>
+
 
 /* Definitions. */
 
@@ -126,11 +128,9 @@
   pm_perror( reason )
 char* reason;
 {
-  extern __const char *__const sys_errlist[];
-  extern int errno;
   char* e;
 
-  e = sys_errlist[errno];
+  e = strerror(errno);
 
   if ( reason != 0 && reason[0] != '\0' )
     (void) fprintf( stderr, "%s: %s - %s\n", progname, reason, e );