add some missing ifdefs
authorplugwash <plugwash@p10link.net>
Fri, 12 Feb 2010 22:26:21 +0000 (22:26 +0000)
committerplugwash <plugwash@p10link.net>
Fri, 12 Feb 2010 22:26:21 +0000 (22:26 +0000)
git-svn-id: file:///svnroot/lcore/trunk@76 b1de8a11-f9be-4011-bde0-cc7ace90066a

lsocket.pas

index 53205e6b92079919809831a2833a12018e50c9c1..7f610928d1d173ca24f164bc13d199f04b98df5f 100755 (executable)
@@ -132,7 +132,9 @@ type
       //this one has to be kept public for now because lcorewsaasyncselect calls it\r
       procedure connectionfailedhandler(error:word);\r
     private\r
-      isv6socket : boolean; //identifies if the socket is v6, set by bindsocket\r
+      {$ifdef ipv6}\r
+        isv6socket : boolean; //identifies if the socket is v6, set by bindsocket\r
+      {$endif}\r
       procedure taskcallconnectionfailedhandler(wparam,lparam : longint);\r
 \r
       procedure connecttimeouthandler(sender:tobject);\r
@@ -352,7 +354,9 @@ begin
       end;\r
       //gethostbyname(localaddr,host);\r
       inaddrtempsize := makeinaddrv(forwardlookup(localaddr,0),localport,inaddrtemp);\r
-      isv6socket := (inaddrtemp.inaddr.family = AF_INET6);\r
+      {$ifdef ipv6}\r
+        isv6socket := (inaddrtemp.inaddr.family = AF_INET6);\r
+      {$endif}\r
       If Bind(fdhandlein,inaddrtempx,inaddrtempsize)<> {$ifdef win32}0{$else}true{$endif} Then begin\r
         state := wsclosed;\r
         lasterror := {$ifdef win32}getlasterror{$else}socketerror{$endif};\r