aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2013-04-05 14:49:27 -0700
committerTristan Sloughter <[email protected]>2013-04-05 14:49:27 -0700
commit34cee33d7d9e70b4056c7349e214151a7be41cc6 (patch)
treebaeea4d5ff0d4ed6492d825e36a40c78aca83c4a /src
parent073c7cde01902fb8fbed483af2d8de85310a8151 (diff)
parenta96ae5dc597cbc01515c75fea9f41a6d79be91b3 (diff)
downloadrelx-34cee33d7d9e70b4056c7349e214151a7be41cc6.tar.gz
relx-34cee33d7d9e70b4056c7349e214151a7be41cc6.tar.bz2
relx-34cee33d7d9e70b4056c7349e214151a7be41cc6.zip
Merge pull request #42 from ericbmerritt/next
fix unexpected variable issue in build
Diffstat (limited to 'src')
-rw-r--r--src/rcl_dscv_util.erl1
-rw-r--r--src/rcl_provider.erl18
2 files changed, 18 insertions, 1 deletions
diff --git a/src/rcl_dscv_util.erl b/src/rcl_dscv_util.erl
index ba66500..68dcb68 100644
--- a/src/rcl_dscv_util.erl
+++ b/src/rcl_dscv_util.erl
@@ -92,7 +92,6 @@ discover_dir(ProcessDir, File, directory) ->
[Err]
end;
discover_dir(ProcessDir, File, file) ->
- Res = ProcessDir(File, file),
case ProcessDir(File, file) of
{ok, Result} ->
[{ok, Result}];
diff --git a/src/rcl_provider.erl b/src/rcl_provider.erl
index 750b96e..4d8f044 100644
--- a/src/rcl_provider.erl
+++ b/src/rcl_provider.erl
@@ -41,10 +41,28 @@
-opaque t() :: {?MODULE, module()}.
+
+-ifdef(have_callback_support).
+
-callback init(rcl_state:t()) -> {ok, rcl_state:t()} | relcool:error().
-callback do(rcl_state:t()) -> {ok, rcl_state:t()} | relcool:error().
-callback format_error(Reason::term()) -> iolist().
+-else.
+
+%% In the case where R14 or lower is being used to compile the system
+%% we need to export a behaviour info
+-export([behaviour_info/1]).
+-spec behaviour_info(atom()) -> [{atom(), arity()}] | undefined.
+behaviour_info(callbacks) ->
+ [{init, 1},
+ {do, 1},
+ {format_error, 1}];
+behaviour_info(_) ->
+ undefined.
+
+-endif.
+
%%%===================================================================
%%% API
%%%===================================================================