Skip to content

Commit

Permalink
Fix erlang load path for C compilation (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaslong authored Sep 21, 2020
1 parent b5b87a3 commit 7e68a76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/olm/nif.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ defmodule Olm.NIF do

@on_load :load_nifs

def load_nifs(), do: :erlang.load_nif('priv/olm_nif', 0)
def load_nifs(),
do:
__DIR__
|> Path.join("../../priv/olm_nif")
|> :erlang.load_nif(0)

def version(), do: error("version/0")

Expand Down

0 comments on commit 7e68a76

Please sign in to comment.