Bug #1328
[PATCH]
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - |
Description
I am attempting to compile FreeSWITCH (http://www.freeswitch.org/).
I get the following error.
Compiling src/switch_core.c ...
src/switch_core.c: In function `switch_core_setrlimits':
src/switch_core.c:795: error: `RLIMIT_AS' undeclared (first use in this
function)
Some of the other BSDs apparently don't have it either but FreeBSD has
it defined in /usr/include/sys/resource.h as
#define RLIMIT_AS RLIMIT_VMEM /* standard name for RLIMIT_VMEM */
Apparently it is also defined in Linux as well.
Should this be added to DragonFly?
Related todos
History
Updated by alexh about 4 years ago
In my opinion this should be fixed in FreeSWITCH by changing RLIMIT_AS to
RLIMIT_VMEM. If this is in pkgsrc, it should be fixed there.
Neither NetBSD nor OpenBSD have RLIMIT_AS and there is no need for it if it'll be
just the same as RLIMIT_VMEM.
Updated by alexh about 4 years ago
I've just seen that RLIMIT_AS is actually POSIX:
http://www.opengroup.org/onlinepubs/009695399/functions/getrlimit.html
So we should add it. It'll probably happen during GSoC (POSIX Compliance Project).
Updated by vince.dragonfly about 4 years ago
On Wed, May 06, 2009 at 09:57:49AM +0000, Alex Hornung (via DragonFly issue tracker) wrote:
>
> Alex Hornung <ahornung@gmail.com> added the comment:
>
> In my opinion this should be fixed in FreeSWITCH by changing RLIMIT_AS to
> RLIMIT_VMEM. If this is in pkgsrc, it should be fixed there.
> Neither NetBSD nor OpenBSD have RLIMIT_AS and there is no need for it if it'll be
> just the same as RLIMIT_VMEM.
Actually, it turns out that NetBSD *does* have it also.
resource.h:
#define RLIMIT_AS 10 /* virtual process size (inclusive of mmap) */
#define RLIMIT_VMEM RLIMIT_AS /* common alias */
OpenBSD seems to be the only one that does not have it.
By the way, FreeSWITCH is not in pkgsrc. I was trying to compile it
natively. However, the RLIMIT_AS issue was not the only one. Every
time I fixed one problem there was another. Apparently it is very Linux
centric. I don't have a lot of time to work on it so I gave up for now
and am going to take a closer look at yate.
On Fri, May 08, 2009 at 06:44:51AM +0000, Alex Hornung (via DragonFly issue tracker) wrote:
>
> Alex Hornung <ahornung@gmail.com> added the comment:
>
> I've just seen that RLIMIT_AS is actually POSIX:
> http://www.opengroup.org/onlinepubs/009695399/functions/getrlimit.html
>
> So we should add it. It'll probably happen during GSoC (POSIX Compliance Project).
Thanks for following up on this. It is looking to me like RLIMIT_AS is (or is
becoming?) more of the standard and RLIMIT_VMEM is BSD specific. I do not
see any mention of RLIMIT_VMEM in the posix specifications and Linux does not
seem to support it either. At least it did not show up when I grep'd the
Linux headers under /archive/Linux-2.6.13.1 on leaf for it.
Updated by alexh about 4 years ago
RLIMIT_AS definitely seems to be the only real standard here, so I would suggest
to add it for POSIX compliance.
This is Beket's expertise, so I'll just leave it like this.
Updated by Beket about 4 years ago
: RLIMIT_AS definitely seems to be the only real standard here,
: so I would suggest to add it for POSIX compliance.
:
: This is Beket's expertise, so I'll just leave it like this.
Sorry for the delayed response, grabbed!
Cheers,
Stathis
Updated by Beket about 4 years ago
: RLIMIT_AS definitely seems to be the only real standard here,
Anyone any thoughts regarding the attached patch ?
Cheers,
Stathis
Updated by Beket almost 4 years ago
>> RLIMIT_AS definitely seems to be the only real standard here,
> Anyone any thoughts regarding the attached patch ?
Unless no one objects in the next couple of days, I'll push it.
Cheers,
Stathis
Updated by Beket almost 4 years ago
>>> RLIMIT_AS definitely seems to be the only real standard here,
Committed !
a874e0b7827b04e8d4e0d2454639e2fd9aa33220
Updated by dillon almost 4 years ago
:Stathis Kamperis <ekamperi@gmail.com> added the comment:
:
:: RLIMIT_AS definitely seems to be the only real standard here,
:
:Anyone any thoughts regarding the attached patch ?
:
:Cheers,
:Stathis
This might create issues if a pkgsrc package is switch()ing on
the RLIMIT cases and tries to switch on both RLIMIT_VMEM and
RLIMIT_AS.
If RLIMIT_VMEM is not used as much we might be able to just
flat-out rename it to RLIMIT_AS. The question is whether it
would be beneficial to the pkgsrc build or not.
-Matt