From dce7bf35f94d897e8402df157110eccb11f02f56 Mon Sep 17 00:00:00 2001
From: marco <marco@freepascal.org>
Date: Wed, 10 Dec 2003 15:50:50 +0000
Subject: [PATCH]  * fpgetcerrno introduction

---
 fcl/inc/resolve.pp   | 9 +++++++--
 fcl/unix/resolve.inc | 7 +++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/fcl/inc/resolve.pp b/fcl/inc/resolve.pp
index 4fc0977582..06aaec2569 100644
--- a/fcl/inc/resolve.pp
+++ b/fcl/inc/resolve.pp
@@ -3,7 +3,8 @@
 Unit resolve;
 
 {$ifndef win32}
-// Here till BSD supports the netbsd unit.
+// Here till BSD supports the netbsd unit. 
+// MvdV: NetBSD unit? Where?
 {$ifdef linux}
 // Undefine this to use the C library resolve routines. 
 // Don't use under win32, netdb does not work on Win32 (yet) !!
@@ -214,6 +215,7 @@ Implementation
 {$ifdef usenetdb}
 uses netdb;
 {$else}  
+uses initc;
 {$i resolve.inc}
 {$endif}
 
@@ -949,7 +951,10 @@ Finalization
 end.
 {
    $Log$
-   Revision 1.4  2003-05-17 21:52:37  michael
+   Revision 1.5  2003-12-10 15:50:50  marco
+    * fpgetcerrno introduction
+
+   Revision 1.4  2003/05/17 21:52:37  michael
    + Added TURIParser class
 
    Revision 1.3  2003/03/07 20:33:33  michael
diff --git a/fcl/unix/resolve.inc b/fcl/unix/resolve.inc
index a041a6858b..53ebf2758c 100644
--- a/fcl/unix/resolve.inc
+++ b/fcl/unix/resolve.inc
@@ -64,8 +64,11 @@ function getnetbyname ( Name : pchar) : PNetEntry; cdecl; external socklib;
 function getservbyname (name : pchar  ; protocol : pchar) : PServEntry; cdecl; external socklib;
 function getservbyport (port : longint; protocol : pchar) : PServEntry; cdecl; external socklib;
 
-var
-  GetDNSError : longint;external socklib name 'h_errno';
+function  GetDNSError : libcint;
+
+begin
+  GetDNSError:=fpgetCerrno;
+end;
 
 Function InitResolve : Boolean;