unitfork: getfs was deprecated in fpc 2.6.2, use getfilehandle
authorbeware <beware@bircd.org>
Wed, 1 Oct 2025 22:32:46 +0000 (22:32 +0000)
committerbeware <beware@bircd.org>
Wed, 1 Oct 2025 22:32:46 +0000 (22:32 +0000)
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