From f832bae509dea78165f574f8a5fa3c6f29048287 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 15 Jun 2010 16:57:15 +0500 Subject: util.signal: Make kill() available on OpenBSD, NetBSD (thanks Florob, filip). --- util-src/signal.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'util-src') 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 #include +#ifdef __unix__ +#include +#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} -- cgit v1.2.3