summaryrefslogtreecommitdiff
path: root/src/ext_mod.erl
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-02-15 11:31:08 +0100
committerBadlop <badlop@process-one.net>2021-02-16 13:09:21 +0100
commit4495f0f0b90b784a97ecc815623a2a6e1b986c69 (patch)
tree105ca6df8668ecdf654e53a0052418c20cbd200d /src/ext_mod.erl
parentMake fetching roster in mod_privacy lazy (diff)
For OTP<22 define LAGER macro in ext_mod like in rebar.config (#3493)
Diffstat (limited to 'src/ext_mod.erl')
-rw-r--r--src/ext_mod.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ext_mod.erl b/src/ext_mod.erl
index c5a39e3d..9ff53ca8 100644
--- a/src/ext_mod.erl
+++ b/src/ext_mod.erl
@@ -569,8 +569,15 @@ compile_result(Results) ->
[Error|_] -> Error
end.
+maybe_define_lager_macro() ->
+ case list_to_integer(erlang:system_info(otp_release)) < 22 of
+ true -> [{d, 'LAGER'}];
+ false -> []
+ end.
+
compile_options() ->
[verbose, report_errors, report_warnings, debug_info, ?ALL_DEFS]
+ ++ maybe_define_lager_macro()
++ [{i, filename:join(app_dir(App), "include")}
|| App <- [fast_xml, xmpp, p1_utils, ejabberd]]
++ [{i, filename:join(mod_dir(Mod), "include")}