code: 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
+++ b/sys/include/libc.h
@@ -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
+++ b/sys/man/2/brk
@@ -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
+++ b/sys/src/libc/9sys/sbrk.c
@@ -23,7 +23,7 @@
 }
 
 void*
-sbrk(ulong n)
+sbrk(usize n)
 {
 	uintptr bl;