I think we can just delete these extra errno declarations. They've been there forever - or at least since rev 1.1 of _scm.h in CVS (1996) - and I suspect they've just been left in from a time (pre-CVS) before the #include <errno.h> was added.
Can you confirm that ripping this stanza out works for you, then we'll go ahead with that for 1.8.5. I'm sure it works on netbsd, which is all i can test on easily. As for the reswt of the pkgsrc platforms, well my take is that you as upstream should clean things up according to your best judgement and if we need to re-add a patch we'll do it. Given that you're including errno.h always, I think it's just plain wrong to redeclare errno, so rip it out and we'll pick up the pieces if needed.
