The test code from the bug ticket seems to work with it at least.
Reported-by: David Shao <davshao@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2463>
In-discussion-with: vsrinivas
*
* @(#)errno.h 8.5 (Berkeley) 1/21/94
* $FreeBSD: src/sys/sys/errno.h,v 1.28 2005/04/02 12:33:28 das Exp $
- * $DragonFly: src/sys/sys/errno.h,v 1.10 2006/12/05 23:14:55 dillon Exp $
*/
#ifndef _SYS_ERRNO_H_
#define _SYS_ERRNO_H_
#if !defined(_KERNEL) || defined(_KERNEL_VIRTUAL)
+#include <sys/cdefs.h>
+__BEGIN_DECLS
extern __thread int errno;
+__END_DECLS
-#include <sys/cdefs.h>
static __inline int *__error(void)
{
return (&errno);