The 'if' preprocessor directive was added in Erlang/OTP 21.0, but ejabberd currently supports Erlang 20.0 and higher... Let's use 'ifndef' instead. https://www.erlang.org/doc/reference_manual/macros.html#flow-control-in-macros https://www.erlang.org/doc/apps/compiler/notes#compiler-7.2 https://www.erlang.org/patches/otp-21.0#compiler-7.2