aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-15 16:57:15 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-15 16:57:15 +0500
commitf832bae509dea78165f574f8a5fa3c6f29048287 (patch)
tree9474566221cac05ec4a500021a613d823f99c318
parent23474802a88ddcda253ef2000a7afec3376785d8 (diff)
downloadprosody-f832bae509dea78165f574f8a5fa3c6f29048287.tar.gz
prosody-f832bae509dea78165f574f8a5fa3c6f29048287.zip
util.signal: Make kill() available on OpenBSD, NetBSD (thanks Florob, filip).
-rw-r--r--util-src/signal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/util-src/signal.c b/util-src/signal.c
index 2d13383f..e6853f62 100644
--- a/util-src/signal.c
+++ b/util-src/signal.c
@@ -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 @@ static int l_raise(lua_State *L)
return 1;
}
-#if defined _POSIX_SOURCE || (defined(sun) || defined(__sun))
+#ifdef __unix__
/* define some posix only functions */
@@ -373,7 +377,7 @@ static int l_kill(lua_State *L)
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}