diff options
author | Brad Smith <brad@comstyle.com> | 2022-10-30 17:25:32 -0400 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2022-10-31 09:28:17 +1100 |
commit | 7d96cb4703693cbf7a23308cfffee955022c86a9 (patch) | |
tree | 9088c069dbeebac848fdb50b96a2106c3921032b /include | |
parent | 4ebc8d8c27446f884feb3d4771b0685e333f2892 (diff) | |
download | mariadb-git-7d96cb4703693cbf7a23308cfffee955022c86a9.tar.gz |
Fix warning with signal typedef for *BSD
/usr/ports/pobj/mariadb-10.9.3/mariadb-10.9.3/mysys/my_lock.c:183:7: warning: incompatible function pointer types assigning to 'sig_return' (aka 'void (*)(void)') from 'void (*)(int)' [-Wincompatible-function-pointer-types]
ALARM_INIT;
^~~~~~~~~~
/usr/ports/pobj/mariadb-10.9.3/mariadb-10.9.3/include/my_alarm.h:43:16: note: expanded from macro 'ALARM_INIT'
alarm_signal=signal(SIGALRM,my_set_alarm_variable);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/pobj/mariadb-10.9.3/mariadb-10.9.3/mysys/my_lock.c:189:7: warning: incompatible function pointer types passing 'sig_return' (aka 'void (*)(void)') to parameter of type 'void (*)(int)' [-Wincompatible-function-pointer-types]
ALARM_END;
^~~~~~~~~
/usr/ports/pobj/mariadb-10.9.3/mariadb-10.9.3/include/my_alarm.h:44:41: note: expanded from macro 'ALARM_END'
^~~~~~~~~~~~
/usr/include/sys/signal.h:199:27: note: passing argument to parameter here
void (*signal(int, void (*)(int)))(int);
^
2 warnings generated.
The prototype is the same for all of the *BSD's.
void
(*signal(int sigcatch, void (*func)(int sigraised)))(int);
Diffstat (limited to 'include')
-rw-r--r-- | include/my_alarm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/my_alarm.h b/include/my_alarm.h index bc0004476ca..287d226fbac 100644 --- a/include/my_alarm.h +++ b/include/my_alarm.h @@ -31,7 +31,9 @@ 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__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ + defined(__DragonFly__) typedef void (*sig_return)(int); /* Returns type from signal */ #else typedef void (*sig_return)(void); /* Returns type from signal */ |