summaryrefslogtreecommitdiff
path: root/plugin/auth_socket/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/auth_socket/CMakeLists.txt')
-rw-r--r--plugin/auth_socket/CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugin/auth_socket/CMakeLists.txt b/plugin/auth_socket/CMakeLists.txt
index a3f42d416a7..83e0b86d8cb 100644
--- a/plugin/auth_socket/CMakeLists.txt
+++ b/plugin/auth_socket/CMakeLists.txt
@@ -14,6 +14,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
+IF(WIN32)
+ RETURN()
+ENDIF()
+
CHECK_CXX_SOURCE_COMPILES(
"#define _GNU_SOURCE
#include <sys/socket.h>
@@ -57,6 +61,21 @@ IF (HAVE_XUCRED)
SET(ok 1)
ELSE()
+# NetBSD, is that you?
+CHECK_CXX_SOURCE_COMPILES(
+"#include <sys/un.h>
+#include <sys/socket.h>
+int main() {
+ struct unpcbid unp;
+ socklen_t unpl = sizeof(unp);
+ getsockopt(0, 0, LOCAL_PEEREID, &unp, &unpl);
+ }" HAVE_UNPCBID)
+
+IF (HAVE_UNPCBID)
+ ADD_DEFINITIONS(-DHAVE_UNPCBID)
+ SET(ok 1)
+ELSE()
+
# illumos, is that you?
CHECK_CXX_SOURCE_COMPILES(
"#include <ucred.h>
@@ -104,6 +123,7 @@ ENDIF()
ENDIF()
ENDIF()
ENDIF()
+ENDIF()
IF(ok)
MYSQL_ADD_PLUGIN(auth_socket auth_socket.c DEFAULT)