From 0d61a227223994c0523ff2f6cb272b1daa3cffec Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jun 2006 02:23:18 +0300 Subject: Fix for Bug#18246 "compilation error with tcp_wrapper" sql/mysqld.cc: Fix for Bug#18246 "compilation error with tcp_wrapper" Added wrapper functions. --- mysys/Makefile.am | 2 +- mysys/my_libwrap.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 mysys/my_libwrap.c (limited to 'mysys') diff --git a/mysys/Makefile.am b/mysys/Makefile.am index d046b2fa3f8..bc84f44cd29 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -56,7 +56,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ my_gethostbyname.c rijndael.c my_aes.c sha1.c \ my_handler.c my_netware.c my_largepage.c \ my_memmem.c \ - my_windac.c my_access.c base64.c + my_windac.c my_access.c base64.c my_libwrap.c EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ thr_mutex.c thr_rwlock.c libmysys_a_LIBADD = @THREAD_LOBJECTS@ diff --git a/mysys/my_libwrap.c b/mysys/my_libwrap.c new file mode 100644 index 00000000000..29a0ecf3fc6 --- /dev/null +++ b/mysys/my_libwrap.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include +#ifdef HAVE_LIBWRAP +#include +#include +#ifdef NEED_SYS_SYSLOG_H +#include +#endif /* NEED_SYS_SYSLOG_H */ +#endif + +void my_fromhost(struct request_info *req) +{ + fromhost(req); +} + +int my_hosts_access(struct request_info *req) +{ + hosts_access(req); +} + +char *my_eval_client(struct request_info *req) +{ + eval_client(req); +} -- cgit v1.2.1 From e4869536db9688b006135f7bf08845365b81e2b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jun 2006 18:35:19 +0300 Subject: Cleanup to patch for Bug#18246, "compilation error with tcp_wrapper" include/my_libwrap.h: Changed includes to the header file. mysys/my_libwrap.c: Added comment and .c file now takes needed includes from the corresponding .h file. sql/mysqld.cc: Include this block from my_libwra.h now. Moved two variables out of the otherwise same block. --- mysys/my_libwrap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'mysys') diff --git a/mysys/my_libwrap.c b/mysys/my_libwrap.c index 29a0ecf3fc6..be8adbab0a1 100644 --- a/mysys/my_libwrap.c +++ b/mysys/my_libwrap.c @@ -14,14 +14,15 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* + This is needed to be able to compile with original libwrap header + files that don't have the prototypes +*/ + #include +#include + #ifdef HAVE_LIBWRAP -#include -#include -#ifdef NEED_SYS_SYSLOG_H -#include -#endif /* NEED_SYS_SYSLOG_H */ -#endif void my_fromhost(struct request_info *req) { @@ -37,3 +38,5 @@ char *my_eval_client(struct request_info *req) { eval_client(req); } + +#endif /* HAVE_LIBWRAP */ -- cgit v1.2.1