shithub: plan9front

Download patch

ref: 1ec44ec77cfde746dc734a3921ec8fbeb6c743ce
parent: e4b5f170cffd0d5e788d9090f8f2a9802fe267e9
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jul 25 12:03:14 EDT 2021

libc: use usize for sbrk() increment

--- a/sys/include/libc.h	Sun Jul 25 11:54:22 2021
+++ b/sys/include/libc.h	Sun Jul 25 12:03:14 2021
@@ -714,7 +714,7 @@
 extern	long	readn(int, void*, long);
 extern	long	readv(int, IOchunk*, int);
 extern	int	remove(char*);
-extern	void*	sbrk(ulong);
+extern	void*	sbrk(usize);
 extern	long	oseek(int, long, int);
 extern	vlong	seek(int, vlong, int);
 extern	void*	segattach(int, char*, void*, ulong);
--- a/sys/man/2/brk	Sun Jul 25 11:54:22 2021
+++ b/sys/man/2/brk	Sun Jul 25 12:03:14 2021
@@ -11,7 +11,7 @@
 int	brk(void *addr)
 .PP
 .B
-void*	sbrk(ulong incr)
+void*	sbrk(usize incr)
 .SH DESCRIPTION
 .I Brk
 sets the system's idea of the lowest bss location not used by the program
--- a/sys/src/libc/9sys/sbrk.c	Sun Jul 25 11:54:22 2021
+++ b/sys/src/libc/9sys/sbrk.c	Sun Jul 25 12:03:14 2021
@@ -23,7 +23,7 @@
 }
 
 void*
-sbrk(ulong n)
+sbrk(usize n)
 {
 	uintptr bl;