diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-01-19 18:22:51 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-01-19 18:22:51 +0100 |
commit | 3db12ce6b6b435b5dc0f9911055c79eafad0be6c (patch) | |
tree | 0a22a572d931398ffd2b1948b9a6b9d46202de9f | |
parent | 0d8b633ad9ac16b6cfc83a7ba445fbf9b68b1435 (diff) | |
download | mariadb-git-3db12ce6b6b435b5dc0f9911055c79eafad0be6c.tar.gz |
Fix AIX error during compile in my_handler (pointer to data is used, while pointer to function is expected).
This also has generated warnings on all other platforms
-rw-r--r-- | configure.cmake | 10 | ||||
-rw-r--r-- | mysys/my_handler.c | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/configure.cmake b/configure.cmake index 25cc6f5cb52..7037e3eab37 100644 --- a/configure.cmake +++ b/configure.cmake @@ -285,11 +285,11 @@ IF(UNIX) MY_SEARCH_LIBS(__infinity m LIBM) ENDIF() - IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
- # On Solaris, use of intrinsics will screw the lib search logic
- # Force using -lm, so rint etc are found.
- SET(LIBM m)
- ENDIF()
+ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") + # On Solaris, use of intrinsics will screw the lib search logic + # Force using -lm, so rint etc are found. + SET(LIBM m) + ENDIF() MY_SEARCH_LIBS(gethostbyname_r "nsl_r;nsl" LIBNSL) MY_SEARCH_LIBS(bind "bind;socket" LIBBIND) diff --git a/mysys/my_handler.c b/mysys/my_handler.c index 3bc27b622cb..3f8af553db6 100644 --- a/mysys/my_handler.c +++ b/mysys/my_handler.c @@ -576,6 +576,10 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a) will ignore calls to register already registered error numbers. */ +static const char **get_handler_error_messages() +{ + return handler_error_messages; +} void my_handler_error_register(void) { @@ -587,7 +591,7 @@ void my_handler_error_register(void) */ compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) == HA_ERR_LAST + 1); - my_error_register(handler_error_messages, HA_ERR_FIRST, + my_error_register(get_handler_error_messages, HA_ERR_FIRST, HA_ERR_FIRST+ array_elements(handler_error_messages)-1); } |