From 5cc6f05c4dba14d250210d121ad4ca68118cd5ef Mon Sep 17 00:00:00 2001
From: Russ Cox <rsc@swtch.com>
Date: Tue, 9 Dec 2008 16:47:22 +0000
Subject: [PATCH] sprint: the usual gcc "bug"

---
 libc/sprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/sprint.c b/libc/sprint.c
index 44b68d8..3c3c687 100644
--- a/libc/sprint.c
+++ b/libc/sprint.c
@@ -14,7 +14,7 @@ sprint(char *buf, char *fmt, ...)
 	 * on PowerPC, the stack is near the top of memory, so
 	 * we must be sure not to overflow a 32-bit pointer.
 	 */
-	if(buf+len < buf)
+	if((uintptr)buf+len < (uintptr)buf)
 		len = -(uintptr)buf-1;
 
 	va_start(args, fmt);