25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

For OTP<22 define LAGER macro in ext_mod like in rebar.config (#3493)

This commit is contained in:
Badlop 2021-02-15 11:31:08 +01:00
parent fad14ff319
commit 4495f0f0b9

View File

@ -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")}