Commit 8f1b1ab5 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-4175 auth_socket to build on OpenBSD / Bitrig

parent 0d9a6d52
...@@ -22,6 +22,18 @@ int main() { ...@@ -22,6 +22,18 @@ int main() {
getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, 0); getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, 0);
}" HAVE_PEERCRED) }" HAVE_PEERCRED)
IF(HAVE_PEERCRED) IF (NOT HAVE_PEERCRED)
# Hi, OpenBSD!
CHECK_CXX_SOURCE_COMPILES(
"#include <sys/types.h>
#include <sys/socket.h>
int main() {
struct sockpeercred cred;
getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, 0);
}" HAVE_SOCKPEERCRED)
ADD_DEFINITIONS(-Ducred=sockpeercred)
ENDIF()
IF(HAVE_PEERCRED OR HAVE_SOCKPEERCRED)
MYSQL_ADD_PLUGIN(auth_socket auth_socket.c MODULE_ONLY) MYSQL_ADD_PLUGIN(auth_socket auth_socket.c MODULE_ONLY)
ENDIF() ENDIF()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment