Lots of third party programs declare
authorSimon Schubert <corecode@dragonflybsd.org>
Sat, 2 Jul 2005 18:13:52 +0000 (18:13 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Sat, 2 Jul 2005 18:13:52 +0000 (18:13 +0000)
commit6890f9d052032f84b8315c84bd707a115f740de0
treef384bda00c1cb073b7d0d352215a250873fe7c27
parentc09ac74a8fcbdec17aedb3121b1b6002d04a43bd
Lots of third party programs declare
extern int errno;

This breaks when errno is declared as
extern __thread int errno;

Fix the breakage by using a hack as we had before:
Define errno as (*__error()), but this time also
define a static inline __error(void) so that ABI
doesn't break (and we're saving a call as well).
sys/sys/errno.h