fix build in various fpc versions on linux
authorplugwash <plugwash@p10link.net>
Fri, 12 Feb 2010 02:21:31 +0000 (02:21 +0000)
committerplugwash <plugwash@p10link.net>
Fri, 12 Feb 2010 02:21:31 +0000 (02:21 +0000)
git-svn-id: file:///svnroot/lcore/trunk@74 b1de8a11-f9be-4011-bde0-cc7ace90066a

unixstuff.inc

index 0eb9b3d82d29b9ba7a6a33251cd9da5205716f1b..773656d2b15c405cc63138916bb5835d3406abb8 100755 (executable)
@@ -22,7 +22,8 @@
       {$else}\r
        result := invalue;\r
       {$endif}\r
-    end;  \r
+    end; \r
+    {$define need_v6constants}\r
   {$else}\r
     \r
     {$define sigprocmask := fpsigprocmask}\r
@@ -93,6 +94,7 @@
       const\r
         IPPROTO_UDP=17;\r
         IPPROTO_ICMP=1;\r
+      {$define need_v6constants}\r
     {$endif}\r
     {$ifdef ver1_9}\r
       const\r
          result := invalue;\r
        {$endif}\r
       end;\r
+      {$define need_v6constants}\r
     {$endif}\r
     procedure gettimeofday(var tv:ttimeval);inline;\r
     begin\r
       sys_eintr=esyseintr;\r
 \r
   {$endif}\r
+  {$ifdef need_v6constants}\r
+    {$ifdef linux} \r
+      //the below values are only known correct on linux, I don't support \r
+      //1.0.x on any other unix platform atm anyway --plugwash\r
+      const \r
+        IPPROTO_IPV6 = 41;\r
+        IPV6_V6ONLY         = 26;\r
+    {$endif}\r
+  {$endif}\r
 {$endif}\r
+    
\ No newline at end of file