diff options
-rw-r--r-- | include/my_alarm.h | 7 | ||||
-rw-r--r-- | include/my_global.h | 7 | ||||
-rw-r--r-- | include/violite.h | 3 | ||||
-rw-r--r-- | mysys/my_sync.c | 3 | ||||
-rw-r--r-- | plugin/auth_gssapi/gssapi_errmsg.cc | 4 | ||||
-rw-r--r-- | plugin/server_audit/server_audit.c | 4 | ||||
-rw-r--r-- | sql/sql_parse.cc | 3 |
7 files changed, 20 insertions, 11 deletions
diff --git a/include/my_alarm.h b/include/my_alarm.h index 6010da6e2c3..bc0004476ca 100644 --- a/include/my_alarm.h +++ b/include/my_alarm.h @@ -29,6 +29,13 @@ extern ulong my_time_to_wait_for_lock; #if defined(HAVE_ALARM) && !defined(NO_ALARM_LOOP) #include <signal.h> +#ifdef HAVE_SIGHANDLER_T +#define sig_return sighandler_t +#elif defined(SOLARIS) || defined(__sun) || defined(__APPLE__) +typedef void (*sig_return)(int); /* Returns type from signal */ +#else +typedef void (*sig_return)(void); /* Returns type from signal */ +#endif #define ALARM_VARIABLES uint alarm_old=0; \ sig_return alarm_signal=0 #define ALARM_INIT my_have_got_alarm=0 ; \ diff --git a/include/my_global.h b/include/my_global.h index 8103f82a7e2..5e96400eac1 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -531,13 +531,6 @@ typedef int my_socket; /* File descriptor for sockets */ #endif /* Type for fuctions that handles signals */ #define sig_handler RETSIGTYPE -C_MODE_START -#ifdef HAVE_SIGHANDLER_T -#define sig_return sighandler_t -#else -typedef void (*sig_return)(void); /* Returns type from signal */ -#endif -C_MODE_END #if defined(__GNUC__) && !defined(_lint) typedef char pchar; /* Mixed prototypes can take char */ typedef char puchar; /* Mixed prototypes can take char */ diff --git a/include/violite.h b/include/violite.h index 45273ac5f24..b9ab7aeb99a 100644 --- a/include/violite.h +++ b/include/violite.h @@ -138,6 +138,9 @@ typedef my_socket YASSL_SOCKET_T; #define YASSL_SOCKET_T_DEFINED #include <openssl/ssl.h> #include <openssl/err.h> +#ifdef DEPRECATED +#undef DEPRECATED +#endif enum enum_ssl_init_error { diff --git a/mysys/my_sync.c b/mysys/my_sync.c index 2ed62e4541a..5a21a511dda 100644 --- a/mysys/my_sync.c +++ b/mysys/my_sync.c @@ -133,8 +133,6 @@ int my_sync(File fd, myf my_flags) } /* my_sync */ -static const char cur_dir_name[]= {FN_CURLIB, 0}; - /* Force directory information to disk. @@ -151,6 +149,7 @@ int my_sync_dir(const char *dir_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR + static const char cur_dir_name[]= {FN_CURLIB, 0}; File dir_fd; int res= 0; const char *correct_dir_name; diff --git a/plugin/auth_gssapi/gssapi_errmsg.cc b/plugin/auth_gssapi/gssapi_errmsg.cc index 8ea4cab5b02..9b3386fba08 100644 --- a/plugin/auth_gssapi/gssapi_errmsg.cc +++ b/plugin/auth_gssapi/gssapi_errmsg.cc @@ -26,7 +26,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#if defined(__FreeBSD__) || defined(SOLARIS) || defined(__sun) +#include <gssapi/gssapi.h> +#else #include <gssapi.h> +#endif #include <string.h> void gssapi_errmsg(OM_uint32 major, OM_uint32 minor, char *buf, size_t size) { diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index 85bf3c03f9a..8e468cf486d 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -2177,6 +2177,7 @@ struct mysql_event_general_v8 static void auditing_v8(MYSQL_THD thd, struct mysql_event_general_v8 *ev_v8) { +#ifdef __linux__ #ifdef DBUG_OFF #ifdef __x86_64__ static const int cmd_off= 4200; @@ -2198,6 +2199,7 @@ static void auditing_v8(MYSQL_THD thd, struct mysql_event_general_v8 *ev_v8) static const int db_len_off= 68; #endif /*x86_64*/ #endif /*DBUG_OFF*/ +#endif /*__linux*/ struct mysql_event_general event; @@ -2259,6 +2261,7 @@ static void auditing_v13(MYSQL_THD thd, unsigned int *ev_v0) int get_db_mysql57(MYSQL_THD thd, char **name, int *len) { +#ifdef __linux__ int db_off; int db_len_off; if (debug_server_started) @@ -2282,7 +2285,6 @@ int get_db_mysql57(MYSQL_THD thd, char **name, int *len) #endif /*x86_64*/ } -#ifdef __linux__ *name= *(char **) (((char *) thd) + db_off); *len= *((int *) (((char*) thd) + db_len_off)); if (*name && (*name)[*len] != 0) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index df1ff1faf03..3f03f27e21c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1295,7 +1295,8 @@ bool do_command(THD *thd) mysql_mutex_lock(&thd->LOCK_thd_data); if (thd->wsrep_conflict_state == MUST_ABORT) { - DBUG_PRINT("wsrep",("aborted for wsrep rollback: %lu", thd->real_id)); + DBUG_PRINT("wsrep",("aborted for wsrep rollback: %lu", + (long unsigned int) thd->real_id)); wsrep_client_rollback(thd); } mysql_mutex_unlock(&thd->LOCK_thd_data); |