mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
FreeBSD compilation fixes
* FreeBSD calls amd64 what Linux calls x86_64 * signal returns void (*)(int) * struct pam_message has char*, not const char* * krb5_free_unparsed_name exists, but is deprecated
This commit is contained in:
parent
70ab43b5b0
commit
4adc1269cc
5 changed files with 10 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
IF(MSVC)
|
||||
PROJECT(wolfssl C ASM_MASM)
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
|
||||
PROJECT(wolfssl C ASM)
|
||||
ELSE()
|
||||
PROJECT(wolfssl C)
|
||||
|
@ -9,7 +9,7 @@ ENDIF()
|
|||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
IF(MSVC)
|
||||
SET(WOLFSSL_INTELASM ON)
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
|
||||
MESSAGE_ONCE(NO_INTEL_ASSEMBLY "Disable Intel assembly for WolfSSL - compiler is too old")
|
||||
ELSEIF(WITH_MSAN)
|
||||
|
@ -119,7 +119,7 @@ IF(WOLFSSL_INTELASM)
|
|||
SET(HAVE_INTEL_RDSEED 1)
|
||||
SET(WOLFSSL_X86_64_BUILD 1)
|
||||
ENDIF()
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
|
||||
SET(HAVE_INTEL_RDSEED 1)
|
||||
SET(USE_INTEL_SPEEDUP 1)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES
|
||||
|
|
|
@ -31,7 +31,7 @@ extern ulong my_time_to_wait_for_lock;
|
|||
#include <signal.h>
|
||||
#ifdef HAVE_SIGHANDLER_T
|
||||
#define sig_return sighandler_t
|
||||
#elif defined(SOLARIS) || defined(__sun) || defined(__APPLE__)
|
||||
#elif defined(SOLARIS) || defined(__sun) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
typedef void (*sig_return)(int); /* Returns type from signal */
|
||||
#else
|
||||
typedef void (*sig_return)(void); /* Returns type from signal */
|
||||
|
|
|
@ -58,7 +58,7 @@ IF (WIN32)
|
|||
my_win_popen.cc)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
IF(NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
|
||||
#Check for PCLMUL instruction (x86)
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
int main()
|
||||
|
|
|
@ -20,6 +20,7 @@ ELSE()
|
|||
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${GSSAPI_INCS})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${GSSAPI_LIBS})
|
||||
SET(CMAKE_REQUIRED_FLAGS "-Werror -Wall")
|
||||
INCLUDE(CheckCXXSymbolExists)
|
||||
CHECK_CXX_SYMBOL_EXISTS(krb5_free_unparsed_name "krb5.h" HAVE_KRB5_FREE_UNPARSED_NAME)
|
||||
IF(HAVE_KRB5_FREE_UNPARSED_NAME)
|
||||
|
|
|
@ -22,9 +22,9 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags __attribute__((unused)),
|
|||
struct pam_response *resp = 0;
|
||||
int pam_err, retval = PAM_SYSTEM_ERR;
|
||||
struct pam_message msg[N] = {
|
||||
{ PAM_TEXT_INFO, "Challenge input first." },
|
||||
{ PAM_PROMPT_ECHO_OFF, "Enter:" },
|
||||
{ PAM_ERROR_MSG, "Now, the magic number!" }
|
||||
{ PAM_TEXT_INFO, (char*)"Challenge input first." },
|
||||
{ PAM_PROMPT_ECHO_OFF, (char*)"Enter:" },
|
||||
{ PAM_ERROR_MSG, (char*)"Now, the magic number!" }
|
||||
};
|
||||
const struct pam_message *msgp[N] = { msg, msg+1, msg+2 };
|
||||
char *r1 = 0, *r2 = 0;
|
||||
|
@ -46,7 +46,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags __attribute__((unused)),
|
|||
{
|
||||
free(resp);
|
||||
msg[0].msg_style = PAM_PROMPT_ECHO_ON;
|
||||
msg[0].msg = "PIN:";
|
||||
msg[0].msg = (char*)"PIN:";
|
||||
pam_err = (*conv->conv)(1, msgp, &resp, conv->appdata_ptr);
|
||||
|
||||
if (pam_err != PAM_SUCCESS || !resp || !((r2= resp[0].resp)))
|
||||
|
|
Loading…
Reference in a new issue