1 --- sql/conn_handler/socket_connection.cc.orig	2024-04-10 06:26:28 UTC
2 +++ sql/conn_handler/socket_connection.cc
3 @@ -961,9 +961,11 @@ bool check_connection_refused_by_tcp_wrapper(MYSQL_SOC
4    signal(SIGCHLD, SIG_DFL);
5    request_init(&req, RQ_DAEMON, libwrap_name, RQ_FILE,
6                 mysql_socket_getfd(connect_sock), nullptr);
7 -  fromhost(&req);
8 +  void (*my_fromhost) (void *) = (void (*)(void *)) fromhost;
9 +  my_fromhost(&req);
10 
11 -  if (!hosts_access(&req)) {
12 +  int (*my_hosts_access) (void *) = (int (*) (void *)) hosts_access;
13 +  if (!my_hosts_access(&req)) {
14      /*
15        This may be stupid but refuse() includes an exit(0)
16        which we surely don't want...
17 @@ -975,12 +977,13 @@ bool check_connection_refused_by_tcp_wrapper(MYSQL_SOC
18        This is unproblematic as TCP-wrapper is unix specific,
19        anyway.
20      */
21 +    char *(*my_eval_client) (void *) = (char *(*) (void *)) eval_client;
22      syslog(LOG_AUTH | LOG_WARNING, "refused connect from %s",
23 -           eval_client(&req));
24 +           my_eval_client(&req));
25 
26  #ifdef HAVE_LIBWRAP_PROTOTYPES
27      // Some distros have patched tcpd.h to have proper prototypes
28 -    if (req.sink) (req.sink)(req.fd);
29 +    if (req.sink) ((void (*)(int)) (req.sink))(req.fd);
30  #else
31      // Some distros have not patched tcpd.h
32      if (req.sink) ((void (*)(int))req.sink)(req.fd);
33