summaryrefslogtreecommitdiff
path: root/archivers/afio/patches/patch-ac
blob: 97563cdbc6dc690b7d5ca5e8838094f39091f416 (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
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-ac,v 1.1 2005/01/19 17:08:09 tv Exp $

--- afio.c.orig	2005-01-19 11:49:18.000000000 -0500
+++ afio.c
@@ -210,8 +210,11 @@ extern char *sys_errlist[];
 #endif
 
 #ifndef	major
-#ifdef sun
+#if defined(sun) || defined(__INTERIX)
 #include <sys/mkdev.h>
+# if !defined(makedev) && defined(mkdev)
+#  define makedev(a,b) mkdev((a),(b))
+# endif
 #else
 #include <sys/sysmacros.h>
 #endif
@@ -4354,12 +4357,16 @@ fswrite (fd, buf, len)
 STATIC char *
 syserr ()
 {
+#ifdef __INTERIX
+  return strerror(errno);
+#else
   static char msg[40];
 
   if (errno > 0 && errno < sys_nerr)
     return ((char *) sys_errlist[errno]);
   VOID sprintf (msg, "Unknown error (errno %d)", errno);
   return (msg);
+#endif
 }
 
 /*