summaryrefslogtreecommitdiff
path: root/lib/libc/sys/mquery.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-09-11 13:26:21 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-09-11 13:26:21 +0000
commitc7b05d22d4364f15fbb4613057614c7c4141d5ea (patch)
tree7c815ee3719e2ece8d7d053e42f8d842c9b50142 /lib/libc/sys/mquery.c
parent97d2e2140973d0f19150fb246a3e179a62c785cb (diff)
Use PROTO_NORMAL() on __syscall to go direct, adjusting the declaration
to eliminate some casts. Retire some uses of old-style STUB* macros where superseded by namespace.h bits tweaks and ok deraadt@
Diffstat (limited to 'lib/libc/sys/mquery.c')
-rw-r--r--lib/libc/sys/mquery.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/libc/sys/mquery.c b/lib/libc/sys/mquery.c
index 53b27f971de..10d3d31a35e 100644
--- a/lib/libc/sys/mquery.c
+++ b/lib/libc/sys/mquery.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mquery.c,v 1.7 2011/10/16 06:29:56 guenther Exp $ */
+/* $OpenBSD: mquery.c,v 1.8 2015/09/11 13:26:20 guenther Exp $ */
/*
* Written by Artur Grabowski <art@openbsd.org> Public Domain
*/
@@ -6,21 +6,18 @@
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/syscall.h>
-#include "thread_private.h"
-register_t __syscall(quad_t, ...);
+void *__syscall(quad_t, ...);
+PROTO_NORMAL(__syscall);
-STUB_PROTOTYPE(mquery);
-
-STUB_ALIAS(mquery);
+DEF_SYS(mquery);
/*
* This function provides 64-bit offset padding.
*/
void *
-STUB_NAME(mquery)(void *addr, size_t len, int prot, int flags, int fd,
- off_t offset)
+mquery(void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
- return((void *)__syscall((quad_t)SYS_mquery, addr, len, prot,
- flags, fd, 0, offset));
+ return (__syscall(SYS_mquery, addr, len, prot, flags, fd, 0, offset));
}
+DEF_WEAK(mquery);