mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 16:21:06 +00:00
Fix compilation
This commit is contained in:
parent
962dba7828
commit
052fa7b33e
@ -1,3 +1,7 @@
|
|||||||
|
2010-08-14 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/prlimit.c: Make it compile.
|
||||||
|
|
||||||
2010-08-12 Ulrich Drepper <drepper@redhat.com>
|
2010-08-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/bits/termios.h: Define EXTPROC.
|
* sysdeps/unix/sysv/linux/bits/termios.h: Define EXTPROC.
|
||||||
|
@ -24,12 +24,12 @@
|
|||||||
#ifdef __NR_prlimit64
|
#ifdef __NR_prlimit64
|
||||||
int
|
int
|
||||||
prlimit (__pid_t pid, enum __rlimit_resource resource,
|
prlimit (__pid_t pid, enum __rlimit_resource resource,
|
||||||
__const struct rlimit *new_limit, struct rlimit *old_limit)
|
__const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
|
||||||
{
|
{
|
||||||
struct rlimit64 new_rlimit64_mem;
|
struct rlimit64 new_rlimit64_mem;
|
||||||
struct rlimit64 *new_rlimit64 = NULL;
|
struct rlimit64 *new_rlimit64 = NULL;
|
||||||
struct rlimit64 old_rlimit64_mem;
|
struct rlimit64 old_rlimit64_mem;
|
||||||
struct rlimit64 *old_rlimit64 = (old_rlimiit != NULL
|
struct rlimit64 *old_rlimit64 = (old_rlimit != NULL
|
||||||
? &old_rlimit64_mem : NULL);
|
? &old_rlimit64_mem : NULL);
|
||||||
|
|
||||||
if (new_rlimit != NULL)
|
if (new_rlimit != NULL)
|
||||||
@ -39,7 +39,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
|
|||||||
else
|
else
|
||||||
new_rlimit64_mem.rlim_cur = new_rlimit->rlim_cur;
|
new_rlimit64_mem.rlim_cur = new_rlimit->rlim_cur;
|
||||||
if (new_rlimit->rlim_max == RLIM_INFINITY)
|
if (new_rlimit->rlim_max == RLIM_INFINITY)
|
||||||
new_rlimit64_mem.rlim_max = = RLIM64_INFINITY;
|
new_rlimit64_mem.rlim_max = RLIM64_INFINITY;
|
||||||
else
|
else
|
||||||
new_rlimit64_mem.rlim_max = new_rlimit->rlim_max;
|
new_rlimit64_mem.rlim_max = new_rlimit->rlim_max;
|
||||||
new_rlimit64 = &new_rlimit64_mem;
|
new_rlimit64 = &new_rlimit64_mem;
|
||||||
@ -48,7 +48,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
|
|||||||
int res = INLINE_SYSCALL (prlimit64, 4, pid, resource, new_rlimit64,
|
int res = INLINE_SYSCALL (prlimit64, 4, pid, resource, new_rlimit64,
|
||||||
old_rlimit64);
|
old_rlimit64);
|
||||||
|
|
||||||
if (res == 0 && old_limit != NULL)
|
if (res == 0 && old_rlimit != NULL)
|
||||||
{
|
{
|
||||||
/* The prlimit64 syscall is ill-designed for 32-bit machines.
|
/* The prlimit64 syscall is ill-designed for 32-bit machines.
|
||||||
We have to provide a 32-bit variant since otherwise the LFS
|
We have to provide a 32-bit variant since otherwise the LFS
|
||||||
@ -59,7 +59,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
|
|||||||
old_rlimit->rlim_cur = old_rlimit64_mem.rlim_cur;
|
old_rlimit->rlim_cur = old_rlimit64_mem.rlim_cur;
|
||||||
if (old_rlimit->rlim_cur != old_rlimit64_mem.rlim_cur)
|
if (old_rlimit->rlim_cur != old_rlimit64_mem.rlim_cur)
|
||||||
{
|
{
|
||||||
if (new_limit == NULL)
|
if (new_rlimit == NULL)
|
||||||
{
|
{
|
||||||
__set_errno (EOVERFLOW);
|
__set_errno (EOVERFLOW);
|
||||||
return -1;
|
return -1;
|
||||||
@ -69,7 +69,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
|
|||||||
old_rlimit->rlim_max = old_rlimit64_mem.rlim_max;
|
old_rlimit->rlim_max = old_rlimit64_mem.rlim_max;
|
||||||
if (old_rlimit->rlim_max != old_rlimit64_mem.rlim_max)
|
if (old_rlimit->rlim_max != old_rlimit64_mem.rlim_max)
|
||||||
{
|
{
|
||||||
if (new_limit == NULL)
|
if (new_rlimit == NULL)
|
||||||
{
|
{
|
||||||
__set_errno (EOVERFLOW);
|
__set_errno (EOVERFLOW);
|
||||||
return -1;
|
return -1;
|
||||||
@ -83,7 +83,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
|
|||||||
#else
|
#else
|
||||||
int
|
int
|
||||||
prlimit (__pid_t pid, enum __rlimit_resource resource,
|
prlimit (__pid_t pid, enum __rlimit_resource resource,
|
||||||
__const struct rlimit *new_limit, struct rlimit *old_limit)
|
__const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
|
||||||
{
|
{
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user