diff options
author | 1998-01-02 05:32:47 +0000 | |
---|---|---|
committer | 1998-01-02 05:32:47 +0000 | |
commit | 24293f8d10f8c69b01eefa399d5acaa90e698aa3 (patch) | |
tree | 80e422e089aee65d4876caebf1f5f1a64e39b156 /lib/libc/sys/mmap.c | |
parent | man page error; helbig (diff) | |
download | wireguard-openbsd-24293f8d10f8c69b01eefa399d5acaa90e698aa3.tar.xz wireguard-openbsd-24293f8d10f8c69b01eefa399d5acaa90e698aa3.zip |
make mmap() return void *, add MAP_FAILED
Diffstat (limited to 'lib/libc/sys/mmap.c')
-rw-r--r-- | lib/libc/sys/mmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/sys/mmap.c b/lib/libc/sys/mmap.c index f0b41ee9ea6..2debc8d2186 100644 --- a/lib/libc/sys/mmap.c +++ b/lib/libc/sys/mmap.c @@ -32,7 +32,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mmap.c,v 1.7 1997/11/14 21:24:39 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mmap.c,v 1.8 1998/01/02 05:32:50 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -47,7 +47,7 @@ quad_t __syscall(quad_t, ...); * This function provides 64-bit offset padding that * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ -caddr_t +void * mmap(addr, len, prot, flags, fd, offset) void *addr; size_t len; @@ -57,6 +57,6 @@ mmap(addr, len, prot, flags, fd, offset) off_t offset; { - return((caddr_t)(long)__syscall((quad_t)SYS_mmap, addr, len, prot, + return((void *)(long)__syscall((quad_t)SYS_mmap, addr, len, prot, flags, fd, 0, offset)); } |