diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-03-08 19:09:15 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-03-08 19:09:15 +0100 |
commit | 8f1b1ab5b02ff1a39081324803f96ea7e1144f5e (patch) | |
tree | cb113337ca5451f7c069d918074b842413410483 /plugin | |
parent | 0d9a6d52d73231429d470b126211dbc92f0c3d56 (diff) | |
download | mariadb-git-8f1b1ab5b02ff1a39081324803f96ea7e1144f5e.tar.gz |
MDEV-4175 auth_socket to build on OpenBSD / Bitrig
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/auth_socket/CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugin/auth_socket/CMakeLists.txt b/plugin/auth_socket/CMakeLists.txt index 731f7d01f9a..ae7dbffe2ae 100644 --- a/plugin/auth_socket/CMakeLists.txt +++ b/plugin/auth_socket/CMakeLists.txt @@ -21,7 +21,19 @@ int main() { struct ucred cred; getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, 0); }" 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) +IF(HAVE_PEERCRED OR HAVE_SOCKPEERCRED) MYSQL_ADD_PLUGIN(auth_socket auth_socket.c MODULE_ONLY) ENDIF() |