diff --git a/mix.exs b/mix.exs index b620e522a..9bcb3edff 100644 --- a/mix.exs +++ b/mix.exs @@ -82,6 +82,7 @@ defmodule Ejabberd.MixProject do if_version_below(~c"23", [{:d, :USE_OLD_PG2}]) ++ if_version_below(~c"24", [{:d, :COMPILER_REPORTS_ONLY_LINES}]) ++ if_version_below(~c"24", [{:d, :SYSTOOLS_APP_DEF_WITHOUT_OPTIONAL}]) ++ + if_version_below(~c"24", [{:d, :OTP_BELOW_24}]) ++ if_version_below(~c"25", [{:d, :OTP_BELOW_25}]) defines = for {:d, value} <- result, do: {:d, value} result ++ [{:d, :ALL_DEFS, defines}] diff --git a/rebar.config b/rebar.config index 8f03e18cb..f7779b1ef 100644 --- a/rebar.config +++ b/rebar.config @@ -129,6 +129,7 @@ {if_version_below, "23", {d, 'USE_OLD_PG2'}}, {if_version_below, "24", {d, 'COMPILER_REPORTS_ONLY_LINES'}}, {if_version_below, "24", {d, 'SYSTOOLS_APP_DEF_WITHOUT_OPTIONAL'}}, + {if_version_below, "24", {d, 'OTP_BELOW_24'}}, {if_version_below, "25", {d, 'OTP_BELOW_25'}}, {if_var_false, debug, no_debug_info}, {if_var_true, debug, debug_info}, diff --git a/src/mod_matrix_gw.erl b/src/mod_matrix_gw.erl index a1e3905a3..476fc1ef6 100644 --- a/src/mod_matrix_gw.erl +++ b/src/mod_matrix_gw.erl @@ -24,7 +24,7 @@ %%%---------------------------------------------------------------------- -module(mod_matrix_gw). --if(?OTP_RELEASE >= 24). +-ifndef(OTP_BELOW_24). -author('alexey@process-one.net'). diff --git a/src/mod_matrix_gw_room.erl b/src/mod_matrix_gw_room.erl index a56c2496b..c5ae25f1e 100644 --- a/src/mod_matrix_gw_room.erl +++ b/src/mod_matrix_gw_room.erl @@ -24,7 +24,7 @@ %%%------------------------------------------------------------------- -module(mod_matrix_gw_room). --if(?OTP_RELEASE >= 24). +-ifndef(OTP_BELOW_24). -behaviour(gen_statem). %% API diff --git a/src/mod_matrix_gw_s2s.erl b/src/mod_matrix_gw_s2s.erl index b2479c7b8..468fbcc14 100644 --- a/src/mod_matrix_gw_s2s.erl +++ b/src/mod_matrix_gw_s2s.erl @@ -23,7 +23,7 @@ %%% %%%------------------------------------------------------------------- -module(mod_matrix_gw_s2s). --if(?OTP_RELEASE >= 24). +-ifndef(OTP_BELOW_24). -behaviour(gen_statem). %% API diff --git a/src/mod_matrix_gw_sup.erl b/src/mod_matrix_gw_sup.erl index f29ea8b0c..f5fa62769 100644 --- a/src/mod_matrix_gw_sup.erl +++ b/src/mod_matrix_gw_sup.erl @@ -20,7 +20,7 @@ %%% %%%---------------------------------------------------------------------- -module(mod_matrix_gw_sup). --if(?OTP_RELEASE >= 24). +-ifndef(OTP_BELOW_24). -behaviour(supervisor). %% API