Skip to content

Commit 5f78832

Browse files
committed
make it compile for otp >= 17
1 parent 76f0094 commit 5f78832

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

include/rafter_consensus_fsm.hrl

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
%% only used during read_only commands
99
cmd :: term()}).
1010

11+
-ifdef(otp17orNewer).
12+
-type dict() :: dict:dict().
13+
-endif.
14+
1115
-record(state, {
1216
leader :: term(),
1317
term = 0 :: non_neg_integer(),

rebar.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{lib_dirs, ["deps", "apps"]}.
44

5-
{erl_opts, [debug_info, warnings_as_errors, {parse_transform, lager_transform}]}.
5+
{erl_opts, [debug_info, warnings_as_errors, {parse_transform, lager_transform}, {platform_define, "^[1-9]", otp17orNewer}]}.
66

77
{deps, [{lager, ".*", {git, "git://github.com/basho/lager", {tag, "2.0.1"}}},
88
{druuid, ".*", {git, "git://github.com/kellymclaughlin/druuid.git", {tag, "0.2"}}}

src/rafter_config.erl

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
-export([quorum/3, quorum_max/3, voters/1, voters/2, followers/2,
77
reconfig/2, allow_config/2, has_vote/2]).
88

9+
-ifdef(otp17orNewer).
10+
-type dict() :: dict:dict().
11+
-endif.
12+
913
%%====================================================================
1014
%% API
1115
%%====================================================================

0 commit comments

Comments
 (0)