Software /
code /
prosody
Diff
util-src/signal.c @ 3274:366ac5e47096
util.signal: Make kill() available on OpenBSD, NetBSD (thanks Florob, filip).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 15 Jun 2010 16:57:15 +0500 |
parent | 2459:66f60e69567b |
child | 3282:8ef3beed0779 |
line wrap: on
line diff
--- a/util-src/signal.c Tue Jun 15 09:59:26 2010 +0500 +++ b/util-src/signal.c Tue Jun 15 16:57:15 2010 +0500 @@ -29,6 +29,10 @@ #include <signal.h> #include <stdlib.h> +#ifdef __unix__ +#include <sys/param.h> +#endif + #include "lua.h" #include "lauxlib.h" @@ -326,7 +330,7 @@ return 1; } -#if defined _POSIX_SOURCE || (defined(sun) || defined(__sun)) +#ifdef __unix__ /* define some posix only functions */ @@ -373,7 +377,7 @@ static const struct luaL_Reg lsignal_lib[] = { {"signal", l_signal}, {"raise", l_raise}, -#if defined _POSIX_SOURCE || (defined(sun) || defined(__sun)) +#ifdef __unix__ {"kill", l_kill}, #endif {NULL, NULL}