Permalink
Browse files

Changed priv dir loading to allow packaging with reltool

  • Loading branch information...
1 parent 3eed568 commit 58f7ae7c94da90669d88e69253bbc3acd440d745 @OJ OJ committed Jun 23, 2011
Showing with 5 additions and 1 deletion.
  1. +4 −0 Makefile
  2. +1 −1 src/ossp_uuid.erl
View
4 Makefile
@@ -0,0 +1,4 @@
+all: compile
+
+compile:
+ @./rebar compile
View
2 src/ossp_uuid.erl
@@ -11,7 +11,7 @@
init() ->
case code:which(?MODULE) of
Filename when is_list(Filename) ->
- erlang:load_nif(filename:join([filename:dirname(Filename),"../priv/ossp_uuid_drv"]), []);
+ erlang:load_nif(filename:join([code:priv_dir(ossp_uuid), "ossp_uuid_drv"]), []);
Err ->
Err
end.

0 comments on commit 58f7ae7

Please sign in to comment.