getting v4 local IPs was not working on 64 bits unix
authorbeware <beware@bircd.org>
Thu, 18 Sep 2025 23:42:12 +0000 (23:42 +0000)
committerbeware <beware@bircd.org>
Thu, 18 Sep 2025 23:42:12 +0000 (23:42 +0000)
lcorelocalips.pas

index 453ce81c4149986a6e3d111718dbce9a811e2968..07752ca5b55184cf630a8aac69b0e6fb0eeb8068 100644 (file)
@@ -82,13 +82,18 @@ const
   {amd64: mac OS X: $C00C6924; freeBSD: $c0106924}\r
 type\r
   tifconf=packed record\r
   {amd64: mac OS X: $C00C6924; freeBSD: $c0106924}\r
 type\r
   tifconf=packed record\r
-    ifc_len:longint;\r
+    ifc_len:taddrint;\r
     ifcu_rec:pointer;\r
   end;\r
 \r
   tifrec=packed record\r
     ifr_ifrn:array [0..IF_NAMESIZE-1] of char;\r
     ifcu_rec:pointer;\r
   end;\r
 \r
   tifrec=packed record\r
     ifr_ifrn:array [0..IF_NAMESIZE-1] of char;\r
-    ifru_addr:TSockAddr;\r
+     case integer of\r
+       0: (ifru_addr: Tsockaddr);\r
+     {$ifdef cpu64}\r
+     //tifrec is 40 bytes on 64 bits due to a union with one of the other data types\r
+       1: (sizefor64: array[0..23] of byte);\r
+     {$endif}\r
   end;\r
 \r
 var\r
   end;\r
 \r
 var\r