unitfork: getfs was deprecated in fpc 2.6.2, use getfilehandle
[lcore.git] / unitfork.pas
index 3bcb3b1c3a408abfe325d7b9d750ae54c033a952..9e8503fbe576936203992b0bdf660655e775b6cf 100644 (file)
@@ -65,7 +65,11 @@ begin
     if ioresult <> 0 then exit;\r
   end;\r
 \r
+  {$IF FPC_FULLVERSION>=20602}\r
+  handle := getfilehandle(pidfile);\r
+  {$else}\r
   handle := getfs(pidfile);\r
+  {$endif}\r
 \r
   //debugout('got handle');\r
   {check if locking is possible: it's not if other process still runs}\r