1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
$NetBSD: patch-ad,v 1.1.1.1 2010/09/21 11:01:22 fhajny Exp $
Fix POSIX logic for BSD systems
--- util-src/signal.c.orig 2010-06-13 00:23:02.000000000 +0000
+++ 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}
|