summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2022-02-02 16:41:13 +0200
committerMonty <monty@mariadb.org>2022-02-08 14:32:28 +0200
commit88fb89acb7ad6a7300b01d02d71d2cee00449ec4 (patch)
treed441bebc652b44640cb0e938a1d85e7b9f852f22 /mysys
parentdf02de68f3b42741289d85296255a1a169358a12 (diff)
downloadmariadb-git-88fb89acb7ad6a7300b01d02d71d2cee00449ec4.tar.gz
Fixes some compiler issues on AIX (
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_addr_resolve.c2
-rw-r--r--mysys/my_gethwaddr.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/mysys/my_addr_resolve.c b/mysys/my_addr_resolve.c
index 86670cf1db2..444a47bb7c5 100644
--- a/mysys/my_addr_resolve.c
+++ b/mysys/my_addr_resolve.c
@@ -324,7 +324,7 @@ int my_addr_resolve(void *ptr, my_addr_loc *loc)
for the base program. This is depending on if the compilation is
done with PIE or not.
*/
- addr_offset= info.dli_fbase;
+ addr_offset= (void*) info.dli_fbase;
#ifndef __PIE__
if (strcmp(info.dli_fname, my_progname) == 0 &&
addr_resolve((void*) my_addr_resolve, loc) == 0 &&
diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c
index 70e1d549e15..46b62a0166d 100644
--- a/mysys/my_gethwaddr.c
+++ b/mysys/my_gethwaddr.c
@@ -23,6 +23,7 @@
#ifndef MAIN
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__) || defined(__sun) || defined(_WIN32)
static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
{
uint i, res= 1;
@@ -32,6 +33,7 @@ static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
res= 0;
return res;
}
+#endif
#if defined(__APPLE__) || defined(__FreeBSD__)
#include <net/ethernet.h>
@@ -195,4 +197,3 @@ int main(int argc __attribute__((unused)),char **argv)
return 0;
}
#endif
-