Skip to content

Commit fa0859b

Browse files
authored
Replace deprecated Libdl.dlsym_e/Libdl.dlopen_e with Libdl.dlsym/Libdl.dlopen (#782)
1 parent 520fbe5 commit fa0859b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/LinearSolve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using EnumX: EnumX, @enumx
2828
using Markdown: Markdown, @doc_str
2929
using ChainRulesCore: ChainRulesCore, NoTangent
3030
using Reexport: Reexport, @reexport
31-
using Libdl: Libdl, dlsym_e
31+
using Libdl: Libdl
3232
import InteractiveUtils
3333
import RecursiveArrayTools
3434

src/appleaccelerate.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using LinearAlgebra
2-
using Libdl
32

43
# For now, only use BLAS from Accelerate (that is to say, vecLib)
54
const global libacc = "/System/Library/Frameworks/Accelerate.framework/Accelerate"
@@ -19,10 +18,9 @@ struct AppleAccelerateLUFactorization <: AbstractFactorization end
1918
const AA_IS_AVAILABLE = false
2019
__appleaccelerate_isavailable() = false
2120
else
22-
@static if Libdl.dlopen_e(libacc) == C_NULL
21+
@static if Libdl.dlopen(libacc; throw_error = false) === nothing
2322
__appleaccelerate_isavailable() = false
24-
end
25-
@static if dlsym_e(Libdl.dlopen_e(libacc), "dgetrf_") == C_NULL
23+
elseif Libdl.dlsym(Libdl.dlopen(libacc), "dgetrf_"; throw_error = false) === nothing
2624
__appleaccelerate_isavailable() = false
2725
else
2826
__appleaccelerate_isavailable() = true

0 commit comments

Comments
 (0)