diff options
Diffstat (limited to 'libc/sysdeps/linux/x86_64/brk.c')
| -rw-r--r-- | libc/sysdeps/linux/x86_64/brk.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libc/sysdeps/linux/x86_64/brk.c b/libc/sysdeps/linux/x86_64/brk.c index eddfd9830..66b34b527 100644 --- a/libc/sysdeps/linux/x86_64/brk.c +++ b/libc/sysdeps/linux/x86_64/brk.c @@ -13,9 +13,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ #include <errno.h> #include <unistd.h> @@ -24,20 +23,20 @@ /* This must be initialized data because commons can't have aliases. */ void *__curbrk attribute_hidden = 0; -libc_hidden_proto(brk) -int brk (void *addr) +int brk(void *addr) { - void *__unbounded newbrk; + void *newbrk; __asm__ ("syscall\n" - : "=a" (newbrk) - : "0" (__NR_brk), "D" (__ptrvalue (addr)) - : "r11","rcx","memory"); + : "=a" (newbrk) + : "0" (__NR_brk), "D" (addr) + : "r11", "rcx" + ); __curbrk = newbrk; if (newbrk < addr) { - __set_errno (ENOMEM); + __set_errno(ENOMEM); return -1; } |
