summaryrefslogtreecommitdiff
path: root/databases/mysql51-server
diff options
context:
space:
mode:
authorchristos <christos>2013-08-22 11:09:46 +0000
committerchristos <christos>2013-08-22 11:09:46 +0000
commit70385683bd63a11db96da95920f0ea5e1f75079a (patch)
tree01ddbe22228bf3d2e81f2cd489d4228aca235b33 /databases/mysql51-server
parentd35d75d3945280ef6996ba6689f3c4a53c718e42 (diff)
downloadpkgsrc-70385683bd63a11db96da95920f0ea5e1f75079a.tar.gz
don't use gethostbyname_r unless there is a prototype in scope.
Diffstat (limited to 'databases/mysql51-server')
-rw-r--r--databases/mysql51-server/distinfo7
-rw-r--r--databases/mysql51-server/patches/patch-ae19
-rw-r--r--databases/mysql51-server/patches/patch-include_my__net.h15
-rw-r--r--databases/mysql51-server/patches/patch-mysys_my__net.c15
-rw-r--r--databases/mysql51-server/patches/patch-mysys_my__thr__init.c33
5 files changed, 82 insertions, 7 deletions
diff --git a/databases/mysql51-server/distinfo b/databases/mysql51-server/distinfo
index 78fbf81c10c..078ee0eb186 100644
--- a/databases/mysql51-server/distinfo
+++ b/databases/mysql51-server/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2013/08/04 10:20:24 adam Exp $
+$NetBSD: distinfo,v 1.29 2013/08/22 11:09:46 christos Exp $
SHA1 (mysql-5.1.71.tar.gz) = a71c77c43aa8374ccb6e09f0ad7f225846af59e6
RMD160 (mysql-5.1.71.tar.gz) = 4077b4aab7297a48b5dc180acf35c9a94bce366c
@@ -7,7 +7,7 @@ SHA1 (patch-aa) = 2a5321738e637a56e57cd6b1b40908d2bf275506
SHA1 (patch-ab) = 4c485a74d55553d63fc3dbc0350d0aa0068e1fcf
SHA1 (patch-ac) = bfb6eec77d7c5aa8d2b849632769005dcf2e272c
SHA1 (patch-ad) = 5fd4db0e04a97289f38a5467bbae5041f4082b51
-SHA1 (patch-ae) = e682e8c7a260706cbfd802885bfe100c0e0d31be
+SHA1 (patch-ae) = 3b9a0822b2fab21dea57b12d005eeae0ef9f66be
SHA1 (patch-af) = 1e13ba542b4fc2a1d59fc822d06c76bc4e92dc23
SHA1 (patch-ag) = 85df1a0080376c5aff1a963e5532cb2c1ec5949d
SHA1 (patch-ah) = a608060cee7aadaf8bcde84016a73131a75dea32
@@ -25,5 +25,8 @@ SHA1 (patch-as) = 8167416a083a011ded19d176bc488c94d9eb7abf
SHA1 (patch-at) = 307a0785190f8bc175226ce83288cc85f7da4631
SHA1 (patch-au) = 51291771b994d199fb6de6a17dd7809a7bf39b68
SHA1 (patch-ax) = dbf68af2d2ded85140aac3602d4f6ce5d68cc78a
+SHA1 (patch-include_my__net.h) = 5cfe4c14ea39ce806c615a87a13c74b48d159ffa
+SHA1 (patch-mysys_my__net.c) = 1ee22921d62ccefc41bc9a81b96a576ce391f054
+SHA1 (patch-mysys_my__thr__init.c) = ee03f554b38b1477ab13912333e09cab340b5f56
SHA1 (patch-sql_ha_ndbcluster.cc) = eb076bbce9d1d671331b41f50cf0be220cca7c6b
SHA1 (patch-vio_viossl.c) = ad922587684a635a82c2fa662be7431c63063909
diff --git a/databases/mysql51-server/patches/patch-ae b/databases/mysql51-server/patches/patch-ae
index c60609bc9be..f438dc45860 100644
--- a/databases/mysql51-server/patches/patch-ae
+++ b/databases/mysql51-server/patches/patch-ae
@@ -1,11 +1,20 @@
-$NetBSD: patch-ae,v 1.2 2010/08/13 14:25:35 taca Exp $
+$NetBSD: patch-ae,v 1.3 2013/08/22 11:09:46 christos Exp $
* check sizeof time_t.
* check existence of sigsend().
+* check gethosybyname_r declaration
---- configure.in.orig 2010-07-09 12:34:57.000000000 +0000
-+++ configure.in
-@@ -1946,6 +1946,7 @@ if test "$ac_cv_sizeof_off_t" -eq 0
+--- configure.in.orig 2013-07-11 16:39:36.000000000 +0300
++++ configure.in 2013-08-22 11:15:43.000000000 +0300
+@@ -861,6 +861,7 @@
+ AC_CHECK_LIB(nsl_r, gethostbyname_r, [],
+ AC_CHECK_LIB(nsl, gethostbyname_r))
+ AC_CHECK_FUNC(gethostbyname_r)
++AC_CHECK_DECLS([gethostbyname_r],[],[],[#include <netdb.h>])
+
+ AC_SEARCH_LIBS(setsockopt, socket)
+ # This may get things to compile even if bind-8 is installed
+@@ -1902,6 +1903,7 @@
then
AC_MSG_ERROR("MySQL needs a off_t type.")
fi
@@ -13,7 +22,7 @@ $NetBSD: patch-ae,v 1.2 2010/08/13 14:25:35 taca Exp $
dnl
dnl check if time_t is unsigned
-@@ -2039,7 +2040,7 @@ AC_CHECK_HEADERS(varargs.h stdarg.h dire
+@@ -2004,7 +2006,7 @@
paths.h semaphore.h)
# Already-done: strcasecmp
diff --git a/databases/mysql51-server/patches/patch-include_my__net.h b/databases/mysql51-server/patches/patch-include_my__net.h
new file mode 100644
index 00000000000..b9dc50b8cd0
--- /dev/null
+++ b/databases/mysql51-server/patches/patch-include_my__net.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-include_my__net.h,v 1.1 2013/08/22 11:09:46 christos Exp $
+
+Only use gethostbyname_r if we have a declaration for it.
+
+--- include/my_net.h.orig 2013-07-11 16:39:36.000000000 +0300
++++ include/my_net.h 2013-08-22 11:17:08.000000000 +0300
+@@ -89,7 +89,7 @@
+ #if !defined(HPUX10)
+ struct hostent;
+ #endif /* HPUX */
+-#if !defined(HAVE_GETHOSTBYNAME_R)
++#if !defined(HAVE_GETHOSTBYNAME_R) || !HAVE_DECL_GETHOSTBYNAME_R
+ struct hostent *my_gethostbyname_r(const char *name,
+ struct hostent *result, char *buffer,
+ int buflen, int *h_errnop);
diff --git a/databases/mysql51-server/patches/patch-mysys_my__net.c b/databases/mysql51-server/patches/patch-mysys_my__net.c
new file mode 100644
index 00000000000..3b7604f1c59
--- /dev/null
+++ b/databases/mysql51-server/patches/patch-mysys_my__net.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-mysys_my__net.c,v 1.1 2013/08/22 11:09:46 christos Exp $
+
+Only use gethostbyname_r if we have a declaration for it.
+
+--- mysys/my_net.c.orig 2013-07-11 16:39:36.000000000 +0300
++++ mysys/my_net.c 2013-08-22 12:14:50.000000000 +0300
+@@ -51,7 +51,7 @@
+ usage of getbostbyname_r simpler.
+ */
+
+-#if defined(HAVE_GETHOSTBYNAME_R)
++#if defined(HAVE_GETHOSTBYNAME_R) && HAVE_DECL_GETHOSTBYNAME_R
+
+ #if defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
+
diff --git a/databases/mysql51-server/patches/patch-mysys_my__thr__init.c b/databases/mysql51-server/patches/patch-mysys_my__thr__init.c
new file mode 100644
index 00000000000..6cf897e64b9
--- /dev/null
+++ b/databases/mysql51-server/patches/patch-mysys_my__thr__init.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-mysys_my__thr__init.c,v 1.1 2013/08/22 11:09:46 christos Exp $
+
+Check for the gethostbyname declaration before using it.
+
+--- mysys/my_thr_init.c.orig 2013-07-11 16:39:36.000000000 +0300
++++ mysys/my_thr_init.c 2013-08-22 12:56:33.000000000 +0300
+@@ -42,7 +42,7 @@
+ #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
+ pthread_mutex_t LOCK_localtime_r;
+ #endif
+-#ifndef HAVE_GETHOSTBYNAME_R
++#if !defined(HAVE_GETHOSTBYNAME_R) || !HAVE_DECL_GETHOSTBYNAME_R
+ pthread_mutex_t LOCK_gethostbyname_r;
+ #endif
+ #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
+@@ -162,7 +162,7 @@
+ #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
+ pthread_mutex_init(&LOCK_localtime_r,MY_MUTEX_INIT_SLOW);
+ #endif
+-#ifndef HAVE_GETHOSTBYNAME_R
++#if !defined(HAVE_GETHOSTBYNAME_R) || !HAVE_DECL_GETHOSTBYNAME_R
+ pthread_mutex_init(&LOCK_gethostbyname_r,MY_MUTEX_INIT_SLOW);
+ #endif
+ if (my_thread_init())
+@@ -229,7 +229,7 @@
+ #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
+ pthread_mutex_destroy(&LOCK_localtime_r);
+ #endif
+-#ifndef HAVE_GETHOSTBYNAME_R
++#if !defined(HAVE_GETHOSTBYNAME_R) || !HAVE_DECL_GETHOSTBYNAME_R
+ pthread_mutex_destroy(&LOCK_gethostbyname_r);
+ #endif
+ }