loader/kthread: undef errno for NetBSD

Austin English austinenglish at gmail.com
Mon Feb 2 11:12:33 CST 2009


-- 
-Austin
-------------- next part --------------
diff --git a/loader/kthread.c b/loader/kthread.c
index c791ef6..3661910 100644
--- a/loader/kthread.c
+++ b/loader/kthread.c
@@ -115,6 +115,11 @@ int *__errno_location(void)                            /* Linux */
     pthread_descr descr = __pthread_thread_self();
     return &descr->thread_errno;
 }
+
+#ifdef __errno /* Causes a conflict on NetBSD */
+#undef __errno
+#endif
+
 int *__error(void)     { return __errno_location(); }  /* FreeBSD */
 int *__errno(void)     { return __errno_location(); }  /* NetBSD */
 int *___errno(void)    { return __errno_location(); }  /* Solaris */


More information about the wine-patches mailing list