mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 15:11:55 +00:00
fix RLIMIT_ constants for mips
The mips arch is special in that it uses different RLIMIT_ numbers than other archs, so allow bits/resource.h to override the default RLIMIT_ numbers (empty on all archs except mips). Reported by orc.
This commit is contained in:
committed by
Rich Felker
parent
96315d27b0
commit
fcea534e57
0
arch/arm/bits/resource.h
Normal file
0
arch/arm/bits/resource.h
Normal file
0
arch/i386/bits/resource.h
Normal file
0
arch/i386/bits/resource.h
Normal file
0
arch/microblaze/bits/resource.h
Normal file
0
arch/microblaze/bits/resource.h
Normal file
5
arch/mips/bits/resource.h
Normal file
5
arch/mips/bits/resource.h
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#define RLIMIT_NOFILE 5
|
||||||
|
#define RLIMIT_AS 6
|
||||||
|
#define RLIMIT_RSS 7
|
||||||
|
#define RLIMIT_NPROC 8
|
||||||
|
#define RLIMIT_MEMLOCK 9
|
0
arch/powerpc/bits/resource.h
Normal file
0
arch/powerpc/bits/resource.h
Normal file
0
arch/sh/bits/resource.h
Normal file
0
arch/sh/bits/resource.h
Normal file
0
arch/x32/bits/resource.h
Normal file
0
arch/x32/bits/resource.h
Normal file
0
arch/x86_64/bits/resource.h
Normal file
0
arch/x86_64/bits/resource.h
Normal file
@ -15,6 +15,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
#include <bits/alltypes.h>
|
||||||
|
#include <bits/resource.h>
|
||||||
|
|
||||||
typedef unsigned long long rlim_t;
|
typedef unsigned long long rlim_t;
|
||||||
|
|
||||||
@ -78,11 +79,13 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
|
|||||||
#define RLIMIT_DATA 2
|
#define RLIMIT_DATA 2
|
||||||
#define RLIMIT_STACK 3
|
#define RLIMIT_STACK 3
|
||||||
#define RLIMIT_CORE 4
|
#define RLIMIT_CORE 4
|
||||||
|
#ifndef RLIMIT_RSS
|
||||||
#define RLIMIT_RSS 5
|
#define RLIMIT_RSS 5
|
||||||
#define RLIMIT_NOFILE 7
|
|
||||||
#define RLIMIT_AS 9
|
|
||||||
#define RLIMIT_NPROC 6
|
#define RLIMIT_NPROC 6
|
||||||
|
#define RLIMIT_NOFILE 7
|
||||||
#define RLIMIT_MEMLOCK 8
|
#define RLIMIT_MEMLOCK 8
|
||||||
|
#define RLIMIT_AS 9
|
||||||
|
#endif
|
||||||
#define RLIMIT_LOCKS 10
|
#define RLIMIT_LOCKS 10
|
||||||
#define RLIMIT_SIGPENDING 11
|
#define RLIMIT_SIGPENDING 11
|
||||||
#define RLIMIT_MSGQUEUE 12
|
#define RLIMIT_MSGQUEUE 12
|
||||||
|
Reference in New Issue
Block a user