--- plugin/auth_socket/auth_socket.c.orig Thu Feb 14 21:47:22 2013 +++ plugin/auth_socket/auth_socket.c Thu Feb 14 21:48:24 2013 @@ -26,6 +26,8 @@ */ #define _GNU_SOURCE 1 /* for struct ucred */ +#include "my_global.h" + #include #include #include @@ -44,7 +46,11 @@ static int socket_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SE { unsigned char *pkt; MYSQL_PLUGIN_VIO_INFO vio_info; +#ifdef HAVE_PEERCRED_SOCKPEERCRED + struct sockpeercred cred; +#else struct ucred cred; +#endif socklen_t cred_len= sizeof(cred); struct passwd pwd_buf, *pwd; char buf[1024];