glibc 2.3.1 patch
Ove Kaaven
ovehk at ping.uio.no
Thu Dec 26 18:03:21 CST 2002
The newest glibc in debian unstable, 2.3.1-8, does not seem to want to
export h_errno anymore, which causes a link failure. (and netdb.h now
defines h_errno to *__h_errno_location() regardless of whether
_LIBC_REENTRANT is defined or not.) So I used this hack in WineX, not sure
if it would be anywhere close to the right approach, if the right approach
presumably wasn't to remove this file entirely.
Log Message:
Ove Kaaven <ovek at transgaming.com>
Make Wine compile on glibc 2.3.1.
Index: errno.c
===================================================================
RCS file: /cvsroot/winex/wine/library/errno.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- errno.c 23 Jan 2001 17:13:07 -0000 1.1.1.1
+++ errno.c 26 Dec 2002 23:48:12 -0000 1.2
@@ -4,6 +4,12 @@
* Copyright 1998 Alexandre Julliard
*/
+#include "config.h"
+
+static int *default_errno_location(void);
+static int *default_h_errno_location(void);
+
+#ifdef NO_REENTRANT_X11
/* Get pointers to the static errno and h_errno variables used by Xlib. This
must be done before including <errno.h> makes the variables invisible. */
static int *default_errno_location(void)
@@ -17,11 +23,23 @@
extern int h_errno;
return &h_errno;
}
+#else
+#include <errno.h>
+#include <netdb.h>
+
+static int *default_errno_location(void)
+{
+ return &errno;
+}
+
+static int *default_h_errno_location(void)
+{
+ return &h_errno;
+}
+#endif
int* (*wine_errno_location)(void) = default_errno_location;
int* (*wine_h_errno_location)(void) = default_h_errno_location;
-
-#include "config.h"
/***********************************************************************
* __errno_location/__error/___errno
More information about the wine-patches
mailing list