mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
alpha: Fix generic brk system call emulation in __brk_call (bug 29490)
The kernel special-cases the zero argument for alpha brk, and we can
use that to restore the generic Linux error handling behavior.
Fixes commit b57ab258c1 ("Linux:
Introduce __brk_call for invoking the brk system call").
This commit is contained in:
@@ -21,8 +21,7 @@ __brk_call (void *addr)
|
||||
{
|
||||
unsigned long int result = INTERNAL_SYSCALL_CALL (brk, addr);
|
||||
if (result == -ENOMEM)
|
||||
/* Mimic the default error reporting behavior. */
|
||||
return addr;
|
||||
else
|
||||
return (void *) result;
|
||||
/* Mimic the generic error reporting behavior. */
|
||||
result = INTERNAL_SYSCALL_CALL (brk, 0);
|
||||
return (void *) result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user