Skip to content

Commit 556e4fb

Browse files
committed
fix: broken compiler conditionals
Refs #2337
1 parent 425d099 commit 556e4fb

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

source/dbconnection.pas

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@ function TConnectionParameters.GetLibraries: TStringList;
19261926
rx.ModifierI := True;
19271927
case NetTypeGroup of
19281928
ngMySQL:
1929-
{$IfDef LINUX}
1929+
{$If defined(LINUX)}
19301930
// libmariadb.so.0 (libc,...) => /lib/x86_64-linux-gnu/libmariadb.so
19311931
rx.Expression := '^\s*lib(mysqlclient|mariadb|perconaserverclient)\.[^=]+=>\s*(\S+)$';
19321932
{$ElseIf defined(FREEBSD)}
@@ -1941,15 +1941,15 @@ function TConnectionParameters.GetLibraries: TStringList;
19411941
rx.Expression := '^(dblib|libsybdb).*\.' + SharedSuffix;
19421942
{$EndIf}
19431943
ngPgSQL:
1944-
{$IfDef LINUX}
1944+
{$If defined(LINUX)}
19451945
rx.Expression := '^\s*(libpq)[^=]+=>\s*(\S+)$';
19461946
{$ElseIf defined(FREEBSD)}
19471947
rx.Expression := '(lpq)[^=]+=>\s*(\S+)$';
19481948
{$Else}
19491949
rx.Expression := '^libpq.*\.' + SharedSuffix;
19501950
{$EndIf}
19511951
ngSQLite: begin
1952-
{$IfDef LINUX}
1952+
{$If defined(LINUX)}
19531953
rx.Expression := '^\s*(libsqlite3)[^=]+=>\s*(\S+)$';
19541954
{$ElseIf defined(FREEBSD)}
19551955
rx.Expression := '(lsqlite3)[^=]+=>\s*(\S+)$';
@@ -1965,7 +1965,8 @@ function TConnectionParameters.GetLibraries: TStringList;
19651965
end;
19661966
case NetTypeGroup of
19671967
ngMySQL, ngMSSQL, ngPgSQL, ngSQLite, ngInterbase: begin
1968-
{$IfDEF LINUX}
1968+
{$if defined(LINUX) or defined(FREEBSD)}
1969+
{$If defined(LINUX)}
19691970
// See https://serverfault.com/a/513938
19701971
Process.RunCommandInDir('', '/sbin/ldconfig', ['-p'], LibMapOutput);
19711972
{$ElseIf defined(FREEBSD)}

0 commit comments

Comments
 (0)