@@ -1,3 +1,6 @@
+#if !defined _ISOMAC && defined _IO_MTSAFE_IO
+# include <bits/stdio-lock.h>
+#endif
#include <libio/libio.h>
#ifndef _ISOMAC
@@ -145,11 +145,7 @@ struct _IO_jump_t; struct _IO_FILE;
/* Handle lock. */
#ifdef _IO_MTSAFE_IO
-# if defined __GLIBC__ && __GLIBC__ >= 2
-# include <bits/stdio-lock.h>
-# else
-/*# include <comthread.h>*/
-# endif
+/* _IO_lock_t defined in internal headers during the glibc build. */
#else
typedef void _IO_lock_t;
#endif
@@ -1,6 +1,7 @@
#undef _GNU_SOURCE
#define _XOPEN_SOURCE 600
#undef _LIBC
+#undef _IO_MTSAFE_IO
/* The following macro definitions are a hack. They word around disabling
the GNU extension while still using a few internal headers. */
#define u_char unsigned char
@@ -1,6 +1,7 @@
#undef _GNU_SOURCE
#define _XOPEN_SOURCE 600
#undef _LIBC
+#undef _IO_MTSAFE_IO
/* The following macro definitions are a hack. They word around disabling
the GNU extension while still using a few internal headers. */
#define u_char unsigned char