Fix a couple warnings in glibc (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 20 Apr 2017 22:14:38 +0000 (18:14 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 May 2017 16:13:02 +0000 (12:13 -0400)
Rebuild glibc at your leisure.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/mmap.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sbrk.c

index 47dd4f8..607fc2b 100644 (file)
@@ -37,7 +37,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
   if(offset % PGSIZE)
   {
     errno = EINVAL;
-    return -1;
+    return MAP_FAILED;
   }
   offset /= PGSIZE;
 
index d9ef39e..47a5045 100644 (file)
@@ -69,7 +69,7 @@ __internal_setbrk (uintptr_t addr)
     if(real_new_brk > BRK_END)
       return -1;
        // calling mmap directly to avoid referencing errno before it is initialized.
-    if ((void*)__ros_syscall_noerrno(SYS_mmap, (void*)real_brk,
+    if ((void*)__ros_syscall_noerrno(SYS_mmap, (long)real_brk,
                                         real_new_brk-real_brk,
                                         PROT_READ | PROT_WRITE | PROT_EXEC,
                                         MAP_FIXED | MAP_ANONYMOUS,