From 691d3550c7511642378ae7aa5368dbabbac60862 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 19 Jan 2005 17:08:09 +0000 Subject: Build fix for Interix: strerror() is your friend. --- archivers/afio/distinfo | 3 ++- archivers/afio/patches/patch-ac | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 archivers/afio/patches/patch-ac (limited to 'archivers/afio') diff --git a/archivers/afio/distinfo b/archivers/afio/distinfo index 4e857369476..21bcc48b259 100644 --- a/archivers/afio/distinfo +++ b/archivers/afio/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.3 2004/07/10 15:35:52 salo Exp $ +$NetBSD: distinfo,v 1.4 2005/01/19 17:08:09 tv Exp $ SHA1 (afio-2.5.tgz) = 051765f209fded60f94944da8a76ae37c3423a23 Size (afio-2.5.tgz) = 179184 bytes SHA1 (patch-aa) = e35b47c2f10a6f80d8446e4c22a7a023dae55933 SHA1 (patch-ab) = 234d24918c5d152b6c013e82d5e43a4471cc65de +SHA1 (patch-ac) = 9c631e4ebf9b6aafd9a72461b285dfcae7a25048 diff --git a/archivers/afio/patches/patch-ac b/archivers/afio/patches/patch-ac new file mode 100644 index 00000000000..97563cdbc6d --- /dev/null +++ b/archivers/afio/patches/patch-ac @@ -0,0 +1,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 ++# if !defined(makedev) && defined(mkdev) ++# define makedev(a,b) mkdev((a),(b)) ++# endif + #else + #include + #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 + } + + /* -- cgit v1.2.3