diff --git a/src/asciideck_to_html.erl b/src/asciideck_to_html.erl
index 64f150d..62dfc11 100644
--- a/src/asciideck_to_html.erl
+++ b/src/asciideck_to_html.erl
@@ -13,6 +13,10 @@
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-module(asciideck_to_html).
+
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
-export([translate/2]).
diff --git a/src/asciideck_to_manpage.erl b/src/asciideck_to_manpage.erl
index 4c623be..23b110c 100644
--- a/src/asciideck_to_manpage.erl
+++ b/src/asciideck_to_manpage.erl
@@ -15,6 +15,10 @@
%% The Groff documentation section 4.1 has a pretty good
%% description of the format expected for man pages.
-module(asciideck_to_manpage).
+
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
-export([translate/2]).