File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 { $MESSAGE ERROR 'This Library requires Delphi 2010 or higher.'}
2222 { $IFEND}
2323
24+ // Silence H2586 (legacy $IFEND) on XE4+ where $ENDIF can also close $IF.
25+ // The $LEGACYIFEND directive itself was introduced in XE4 (25.0), so the
26+ // guard is necessary to keep Delphi 2010 / XE / XE2 / XE3 compiling.
27+ { $IF CompilerVersion >= 25.0}
28+ { $LEGACYIFEND ON}
29+ { $IFEND}
30+
2431 { $DEFINE DELPHI}
2532
2633 { $DEFINITIONINFO ON} // Enable code browsing (Ctrl+Click)
Original file line number Diff line number Diff line change @@ -139,12 +139,17 @@ implementation
139139
140140class procedure TArmHwCapProvider.ResolveDynamicImports ();
141141var
142- LHandle: Pointer ;
142+ LHandle: NativeUInt ;
143143begin
144144 FGetAuxVal := nil ;
145145
146+ { $IFDEF FPC}
147+ LHandle := NativeUInt(dlopen(nil , RTLD_NOW));
148+ { $ELSE}
146149 LHandle := dlopen(nil , RTLD_NOW);
147- if LHandle = nil then
150+ { $ENDIF}
151+
152+ if LHandle = 0 then
148153 Exit;
149154
150155 try
@@ -179,12 +184,17 @@ class function TArmHwCapProvider.GetHwCap2(): UInt64;
179184
180185class procedure TArmHwCapProvider.ResolveDynamicImports ();
181186var
182- LHandle: Pointer ;
187+ LHandle: NativeUInt ;
183188begin
184189 FElfAuxInfo := nil ;
185190
191+ { $IFDEF FPC}
192+ LHandle := NativeUInt(dlopen(nil , RTLD_NOW));
193+ { $ELSE}
186194 LHandle := dlopen(nil , RTLD_NOW);
187- if LHandle = nil then
195+ { $ENDIF}
196+
197+ if LHandle = 0 then
188198 Exit;
189199
190200 try
You can’t perform that action at this time.
0 commit comments