diff options
author | Alexis Ballier <aballier@gentoo.org> | 2016-05-01 16:44:09 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2016-05-03 11:13:52 +0200 |
commit | e318bddd93a4c6ad9645a90534e6416edff4d7fd (patch) | |
tree | 1f270ba5f82897970e985ad46304e3fbf809fccd /dev-ml/ocaml-mysql | |
parent | dev-ml/ocaml-gettext: fix build with ocaml 4.03 (diff) | |
download | gentoo-e318bddd93a4c6ad9645a90534e6416edff4d7fd.tar.gz gentoo-e318bddd93a4c6ad9645a90534e6416edff4d7fd.tar.bz2 gentoo-e318bddd93a4c6ad9645a90534e6416edff4d7fd.zip |
dev-ml/ocaml-mysql: fix build with ocaml 4.03
Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ml/ocaml-mysql')
-rw-r--r-- | dev-ml/ocaml-mysql/files/oc43.patch | 37 | ||||
-rw-r--r-- | dev-ml/ocaml-mysql/ocaml-mysql-1.2.0.ebuild | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/dev-ml/ocaml-mysql/files/oc43.patch b/dev-ml/ocaml-mysql/files/oc43.patch new file mode 100644 index 000000000000..5782c343cdab --- /dev/null +++ b/dev-ml/ocaml-mysql/files/oc43.patch @@ -0,0 +1,37 @@ +Index: ocaml-mysql-1.2.0/mysql_stubs.c +=================================================================== +--- ocaml-mysql-1.2.0.orig/mysql_stubs.c ++++ ocaml-mysql-1.2.0/mysql_stubs.c +@@ -508,14 +508,14 @@ db_fetch (value result) + + EXTERNAL value + db_to_row(value result, value offset) { +- int64 off = Int64_val(offset); ++ int64_t off = Int64_val(offset); + MYSQL_RES *res; + + res = RESval(result); + if (!res) + mysqlfailwith("Mysql.to_row: result did not return fetchable data"); + +- if (off < 0 || off > (int64)mysql_num_rows(res)-1) ++ if (off < 0 || off > (int64_t)mysql_num_rows(res)-1) + invalid_argument("Mysql.to_row: offset out of range"); + + mysql_data_seek(res, off); +@@ -640,13 +640,13 @@ db_size(value result) + { + CAMLparam1(result); + MYSQL_RES *res; +- int64 size; ++ int64_t size; + + res = RESval(result); + if (!res) + size = 0; + else +- size = (int64)(mysql_num_rows(res)); ++ size = (int64_t)(mysql_num_rows(res)); + + CAMLreturn(copy_int64(size)); + } diff --git a/dev-ml/ocaml-mysql/ocaml-mysql-1.2.0.ebuild b/dev-ml/ocaml-mysql/ocaml-mysql-1.2.0.ebuild index 76292cff82b2..af4aeb1b8643 100644 --- a/dev-ml/ocaml-mysql/ocaml-mysql-1.2.0.ebuild +++ b/dev-ml/ocaml-mysql/ocaml-mysql-1.2.0.ebuild @@ -22,6 +22,10 @@ SLOT="0/${PV}" LICENSE="LGPL-2" KEYWORDS="~amd64 ~ppc ~x86" +src_prepare() { + has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" +} + src_compile() { emake all |