Skip to content
Permalink
Browse files
MDEV-23926: Follow-up patch to cleanup plugin/auth_pam/CMakeLists.txt…
… code

This patch moves definitions of macros variables
   HAVE_PAM_SYSLOG, HAVE_PAM_EXT_H, HAVE_PAM_APPL_H, HAVE_STRNDUP
from command line (in the form -Dmacros) to the auto-generated
header file config_auth_pam.h
  • Loading branch information
dmitryshulga committed Oct 23, 2020
1 parent 6dc1445 commit 5e7cde4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
@@ -33,19 +33,7 @@ SET(CMAKE_REQUIRED_LIBRARIES pam)
CHECK_FUNCTION_EXISTS(pam_syslog HAVE_PAM_SYSLOG)
SET(CMAKE_REQUIRED_LIBRARIES)

IF(HAVE_PAM_SYSLOG)
ADD_DEFINITIONS(-DHAVE_PAM_SYSLOG)
ENDIF()

IF(HAVE_PAM_EXT_H)
ADD_DEFINITIONS(-DHAVE_PAM_EXT_H)
ENDIF()

IF(HAVE_PAM_APPL_H)
ADD_DEFINITIONS(-DHAVE_PAM_APPL_H)
IF(HAVE_STRNDUP)
ADD_DEFINITIONS(-DHAVE_STRNDUP)
ENDIF(HAVE_STRNDUP)
FIND_LIBRARY(PAM_LIBRARY pam) # for srpm build-depends detection
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)

@@ -16,6 +16,7 @@

#define _GNU_SOURCE 1 /* for strndup */

#include <config_auth_pam.h>
#include <mysql/plugin_auth.h>
#include <stdio.h>
#include <string.h>

0 comments on commit 5e7cde4

Please sign in to comment.