summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2017-03-16 15:46:22 +0000
committermaya <maya@pkgsrc.org>2017-03-16 15:46:22 +0000
commit2a5ebd730923e56c2aa4f9ab68b3eaa3b369697a (patch)
tree4b3871aa4bdc958111dac2d17f0d63ac3b112560 /databases
parentf5240bcf29648ad2aab78fa43e4401f4312e62b1 (diff)
downloadpkgsrc-2a5ebd730923e56c2aa4f9ab68b3eaa3b369697a.tar.gz
mysql57-server: fix compilation on NetBSD. fix -fpermissive error.
netbsd xdrproc_t takes 2 arguments, most others are variadic, os x is 3. ifdef __NetBSD__ to match the signature. PR pkg/52062
Diffstat (limited to 'databases')
-rw-r--r--databases/mysql57-client/distinfo5
-rw-r--r--databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_sock__probe__ix.c15
-rw-r--r--databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__memory.c21
-rw-r--r--databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__transport.c30
4 files changed, 70 insertions, 1 deletions
diff --git a/databases/mysql57-client/distinfo b/databases/mysql57-client/distinfo
index 85f66c00e5c..d394bf51a05 100644
--- a/databases/mysql57-client/distinfo
+++ b/databases/mysql57-client/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2017/01/12 09:39:47 jperkin Exp $
+$NetBSD: distinfo,v 1.8 2017/03/16 15:46:22 maya Exp $
SHA1 (mysql-5.7.17.tar.gz) = 7d159e2d056ab6e10c89e0c8ef12ee7af3b99ef0
RMD160 (mysql-5.7.17.tar.gz) = acd8714fe1bda26466c4490b9e71d510677ac9a5
@@ -23,6 +23,9 @@ SHA1 (patch-mysql-test_CMakeLists.txt) = 4ba56ce255f5f89d9aece93181e54ddb572f301
SHA1 (patch-mysys__ssl_CMakeLists.txt) = 7ec44642cd13c5477175a94a007354c583ca9c3c
SHA1 (patch-mysys_kqueue__timers.c) = 836803e9c7353b813bc22a5b69cc263dea384c9b
SHA1 (patch-mysys_stacktrace.c) = 3e0794f544f0e35f44a694330885478247657842
+SHA1 (patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_sock__probe__ix.c) = 50acc08095063b0eb88fbcb09ae4193d41d280e0
+SHA1 (patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__memory.c) = 7077900830f904c74c79439b856d9d176fc27f15
+SHA1 (patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__transport.c) = d7f87bff5a41ff6a130fcf74dc520b38cedf5924
SHA1 (patch-rapid_plugin_group__replication_rpcgen.cmake) = 5c14be97bd1fd04b2b845f1a2422452445733474
SHA1 (patch-rapid_plugin_x_CMakeLists.txt) = 4e8ddfbdfa2d4e1f4b5c9421aeb4a337b5741165
SHA1 (patch-rapid_unittest_gunit_xplugin_CMakeLists.txt) = a531745be680ee06944678cfd35be10c653d1b17
diff --git a/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_sock__probe__ix.c b/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_sock__probe__ix.c
new file mode 100644
index 00000000000..3d19b85eb76
--- /dev/null
+++ b/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_sock__probe__ix.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_sock__probe__ix.c,v 1.1 2017/03/16 15:46:22 maya Exp $
+
+fix -fpermissive errors, ifc_buf is void*
+
+--- rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/sock_probe_ix.c.orig 2016-11-28 13:32:52.000000000 +0000
++++ rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/sock_probe_ix.c
+@@ -124,7 +124,7 @@ static int init_sock_probe(sock_probe *s
+ interfaces. We are doing this, since the size of sockaddr differs on
+ some platforms.
+ */
+- for (i= 0, ptr= s->ifc.ifc_buf, end= s->ifc.ifc_buf + s->ifc.ifc_len;
++ for (i= 0, ptr=(char*) s->ifc.ifc_buf, end= (char*)s->ifc.ifc_buf + s->ifc.ifc_len;
+ ptr<end;
+ i++)
+ {
diff --git a/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__memory.c b/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__memory.c
new file mode 100644
index 00000000000..550dc972bdf
--- /dev/null
+++ b/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__memory.c
@@ -0,0 +1,21 @@
+$NetBSD: patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__memory.c,v 1.1 2017/03/16 15:46:22 maya Exp $
+
+Workaround netbsd prototype of xdrproc_t being 2 arguments.
+
+--- rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_memory.c.orig 2016-11-28 13:32:52.000000000 +0000
++++ rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_memory.c
+@@ -43,7 +43,14 @@ my_xdr_free (xdrproc_t proc, char *objp)
+ is the case). This will keep this code cross-platform
+ and cross-version compatible.
+ */
++#ifdef __NetBSD__
++ /* NetBSD doesn't have a variadic xdrproc_t...
++ * see https://bugzilla.redhat.com/show_bug.cgi?id=1128820#c24
++ * for a similar problem */
++ (*proc) (&x, objp);
++#else
+ (*proc) (&x, objp, 0);
++#endif
+ }
+
+ void xcom_xdr_free(xdrproc_t f, char *p)
diff --git a/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__transport.c b/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__transport.c
new file mode 100644
index 00000000000..5038d3b04bb
--- /dev/null
+++ b/databases/mysql57-client/patches/patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__transport.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-rapid_plugin_group__replication_libmysqlgcs_src_bindings_xcom_xcom_xcom__transport.c,v 1.1 2017/03/16 15:46:22 maya Exp $
+
+Workaround netbsd prototype of xdrproc_t being 2 arguments.
+
+--- rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c.orig 2016-11-28 13:32:52.000000000 +0000
++++ rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c
+@@ -352,7 +352,11 @@ int apply_xdr(xcom_proto x_proto, gpoint
+ */
+ if (xdr.x_ops){
+ xdr.x_public = (caddr_t)&x_proto; /* Supply protocol version in user field of xdr */
++#ifdef __NetBSD__
++ s = xdrfunc(&xdr, xdrdata);
++#else
+ s = xdrfunc(&xdr, xdrdata, 0);
++#endif
+ }
+ xdr_destroy(&xdr);
+ return s;
+@@ -589,7 +593,11 @@ xdr_proto_sizeof (xcom_proto x_proto, xd
+ is the case). This will keep this code cross-platform
+ and cross-version compatible.
+ */
++#ifdef __NetBSD__
++ stat = func (&x, data);
++#else
+ stat = func (&x, data, 0);
++#endif
+ free (x.x_private);
+ // x_handy is int type for old XDR
+ return stat == TRUE ? (uint64_t)x.x_handy : 0;