File cowboy-1.0.3-integer_to_binary.patch of Package cowboy
diff -Ndur cowboy-1.0.3.orig/src/cowboy_clock.erl cowboy-1.0.3/src/cowboy_clock.erl
--- cowboy-1.0.3.orig/src/cowboy_clock.erl 2015-08-07 18:42:48.000000000 +0300
+++ cowboy-1.0.3/src/cowboy_clock.erl 2015-09-27 20:05:48.245421138 +0300
@@ -167,6 +167,10 @@
month(11) -> <<"Nov">>;
month(12) -> <<"Dec">>.
+-ifndef('HAVE_integer_to_binary_1').
+integer_to_binary(I) -> list_to_binary(integer_to_list(I)).
+-endif.
+
%% Tests.
-ifdef(TEST).
diff -Ndur cowboy-1.0.3.orig/src/cowboy_req.erl cowboy-1.0.3/src/cowboy_req.erl
--- cowboy-1.0.3.orig/src/cowboy_req.erl 2015-08-07 18:42:48.000000000 +0300
+++ cowboy-1.0.3/src/cowboy_req.erl 2015-09-27 20:05:03.334424176 +0300
@@ -1328,6 +1328,10 @@
status(511) -> <<"511 Network Authentication Required">>;
status(B) when is_binary(B) -> B.
+-ifndef('HAVE_integer_to_binary_1').
+integer_to_binary(I) -> list_to_binary(integer_to_list(I)).
+-endif.
+
%% Tests.
-ifdef(TEST).
diff -Ndur cowboy-1.0.3.orig/src/cowboy_static.erl cowboy-1.0.3/src/cowboy_static.erl
--- cowboy-1.0.3.orig/src/cowboy_static.erl 2015-08-07 18:42:48.000000000 +0300
+++ cowboy-1.0.3/src/cowboy_static.erl 2015-09-27 20:05:26.489422610 +0300
@@ -114,6 +114,10 @@
Info = file:read_file_info(Path, [{time, universal}]),
{ok, Req, {Path, Info, Extra}}.
+-ifndef('HAVE_integer_to_binary_1').
+integer_to_binary(I) -> list_to_binary(integer_to_list(I)).
+-endif.
+
-ifdef(TEST).
fullpath_test_() ->
Tests = [