summaryrefslogtreecommitdiff
path: root/databases/mysql57-client/patches
diff options
context:
space:
mode:
authormaya <maya>2017-03-16 15:46:22 +0000
committermaya <maya>2017-03-16 15:46:22 +0000
commitf9ef1ea028f95b102aa798624b06048e0fda39e7 (patch)
treeafd2f30e1c67dba08b437fbe1c2d3b83cf7df83e /databases/mysql57-client/patches
parentf257297ffa6287e10ef97c2af090f418813cdeee (diff)
downloadpkgsrc-f9ef1ea028f95b102aa798624b06048e0fda39e7.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/mysql57-client/patches')
-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
3 files changed, 66 insertions, 0 deletions
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;