summaryrefslogtreecommitdiffstats
path: root/sys/sys/errno.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-08-18 16:16:18 +0000
committerpeter <peter@FreeBSD.org>1996-08-18 16:16:18 +0000
commit1c4eb4a8b6f21d50196415b0f9d2affb5c27dd73 (patch)
treea0697c4e39131ed08630fe5d3846c85774136839 /sys/sys/errno.h
parent5de44aa3b7d940245812204daecd8b0558928b68 (diff)
downloadFreeBSD-src-1c4eb4a8b6f21d50196415b0f9d2affb5c27dd73.zip
FreeBSD-src-1c4eb4a8b6f21d50196415b0f9d2affb5c27dd73.tar.gz
make the declaration of the __error() function C++ safe. Otherwise,
the linker comes up with undefined variables because of the #define errno when using _THREAD_SAFE.
Diffstat (limited to 'sys/sys/errno.h')
-rw-r--r--sys/sys/errno.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index 3dddd45..12fb7d4 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)errno.h 8.5 (Berkeley) 1/21/94
- * $Id: errno.h,v 1.3 1994/08/21 04:41:42 paul Exp $
+ * $Id: errno.h,v 1.4 1996/01/22 00:02:33 julian Exp $
*/
#ifndef _SYS_ERRNO_H_
@@ -44,7 +44,10 @@
#ifndef KERNEL
#ifdef _THREAD_SAFE
-extern int * __error();
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+int * __error __P((void));
+__END_DECLS
#define errno (* __error())
#else
extern int errno; /* global error number */
OpenPOWER on IntegriCloud