diff --git a/code/internet.lisp b/code/internet.lisp
index 8b19236e7f692a64dda6ee95a068f3e74a86e544..7e5e585ca17dceda397473d2dfda62bfc31ed0ed 100644
--- a/code/internet.lisp
+++ b/code/internet.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.50 2006/03/14 15:22:02 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.51 2006/03/17 02:56:45 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -200,10 +200,7 @@ struct in_addr {
   (type int))
 
 #+(and x86 linux)
-(progn
-  (def-alien-routine ("__h_errno_location" h-errno-location) (* c-call:int))
-  (defun get-h-errno ()
-    (alien:deref (h-errno-location) 0)))
+(def-alien-routine get-h-errno c-call:int)
 
 #-(and x86 linux)
 (progn
diff --git a/lisp/Linux-os.c b/lisp/Linux-os.c
index 88b8fabd847d8e27a27ad596885a31f2f8ec3ebc..9e5baa38f9974eccb6c353e3da0817c1be37e2eb 100644
--- a/lisp/Linux-os.c
+++ b/lisp/Linux-os.c
@@ -15,7 +15,7 @@
  * GENCGC support by Douglas Crosher, 1996, 1997.
  * Alpha support by Julian Dolby, 1999.
  *
- * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.25 2005/09/15 18:26:50 rtoy Exp $
+ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.26 2006/03/17 02:56:45 rtoy Exp $
  *
  */
 
@@ -449,3 +449,9 @@ os_dlsym(const char *sym_name, lispobj lib_list)
 	return sym_addr;
     }
 }
+
+int
+get_h_errno()
+{
+    return h_errno;
+}