diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2018-12-13 11:45:45 +0100 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2018-12-13 11:46:53 +0100 |
commit | c88a2d056968254cdb513d81e133d45484a6236a (patch) | |
tree | 938033a3e7c5dae5b1e1edefc8d5dafeacb50efe /mix.exs | |
parent | Add HTTP listener on port 5280 for admin web interface (diff) |
Add code for handling deprecations of get_stacktrace()
Diffstat (limited to 'mix.exs')
-rw-r--r-- | mix.exs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -42,10 +42,19 @@ defmodule Ejabberd.Mixfile do end end + defp if_version_above(ver, okResult) do + if :erlang.system_info(:otp_release) > ver do + okResult + else + [] + end + end + defp erlc_options do # Use our own includes + includes from all dependencies includes = ["include"] ++ deps_include(["fast_xml", "xmpp", "p1_utils"]) [:debug_info, {:d, :ELIXIR_ENABLED}] ++ cond_options() ++ Enum.map(includes, fn(path) -> {:i, path} end) ++ + if_version_above('20', [{:d, :DEPRECATED_GET_STACKTRACE}]) ++ if_function_exported(:crypto, :strong_rand_bytes, 1, [{:d, :STRONG_RAND_BYTES}]) ++ if_function_exported(:rand, :uniform, 1, [{:d, :RAND_UNIFORM}]) ++ if_function_exported(:gb_sets, :iterator_from, 2, [{:d, :GB_SETS_ITERATOR_FROM}]) ++ |