Mail Archives: cygwin-developers/1998/02/03/03:55:51
Andy Piper wrote:
> Setting h_errno causes a SIGSEGV. Is this a bug in cygwin?
Sure. It's a bug in netdb.h header. Here is the fix:
H:\usr\src\cygnus\cdk\winsup\include>diff -u netdb.h.orig netdb.h
--- netdb.h.orig Thu Dec 11 12:56:58 1997
+++ netdb.h Tue Feb 03 14:42:08 1998
@@ -116,7 +116,12 @@
* (left in extern int h_errno).
*/
+#ifdef __INSIDE_CYGWIN_NET__
extern int h_errno;
+#else
+extern int * __imp_h_errno;
+#define h_errno (*__imp_h_errno)
+#endif
#define NETDB_INTERNAL -1 /* see errno */
#define NETDB_SUCCESS 0 /* no problem */
--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.
- Raw text -