diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-09-29 14:22:43 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-09-29 14:22:43 +0100 |
commit | 32fa99e2b7c12397ba8ca1e97f1a8c48aededd1c (patch) | |
tree | 4309df1c8590a53402f9531e3194aab9842dd03e /util-src/pposix.c | |
parent | ab7a5d9e53554eb438d504d841d9de84ecdc72ca (diff) | |
parent | d059f42d87dec4b77e0aad6fb1383bc95399d8c1 (diff) | |
download | prosody-32fa99e2b7c12397ba8ca1e97f1a8c48aededd1c.tar.gz prosody-32fa99e2b7c12397ba8ca1e97f1a8c48aededd1c.zip |
Merge with 0.5
Diffstat (limited to 'util-src/pposix.c')
-rw-r--r-- | util-src/pposix.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c index d27a84b1..265245e0 100644 --- a/util-src/pposix.c +++ b/util-src/pposix.c @@ -91,10 +91,14 @@ static int lc_daemonize(lua_State *L) const char * const facility_strings[] = { "auth", +#if !(defined(sun) || defined(__sun)) "authpriv", +#endif "cron", "daemon", +#if !(defined(sun) || defined(__sun)) "ftp", +#endif "kern", "local0", "local1", @@ -113,10 +117,14 @@ const char * const facility_strings[] = { }; int facility_constants[] = { LOG_AUTH, +#if !(defined(sun) || defined(__sun)) LOG_AUTHPRIV, +#endif LOG_CRON, LOG_DAEMON, +#if !(defined(sun) || defined(__sun)) LOG_FTP, +#endif LOG_KERN, LOG_LOCAL0, LOG_LOCAL1, @@ -365,11 +373,13 @@ int string2resource(const char *s) { if (!strcmp(s, "CPU")) return RLIMIT_CPU; if (!strcmp(s, "DATA")) return RLIMIT_DATA; if (!strcmp(s, "FSIZE")) return RLIMIT_FSIZE; - if (!strcmp(s, "MEMLOCK")) return RLIMIT_MEMLOCK; if (!strcmp(s, "NOFILE")) return RLIMIT_NOFILE; + if (!strcmp(s, "STACK")) return RLIMIT_STACK; +#if !(defined(sun) || defined(__sun)) + if (!strcmp(s, "MEMLOCK")) return RLIMIT_MEMLOCK; if (!strcmp(s, "NPROC")) return RLIMIT_NPROC; if (!strcmp(s, "RSS")) return RLIMIT_RSS; - if (!strcmp(s, "STACK")) return RLIMIT_STACK; +#endif return -1; } |