1 /*	$NetBSD: linux32_missing.h,v 1.9 2009/06/08 14:42:10 njoly Exp $ */
2 
3 /*-
4  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. All advertising materials mentioning features or use of this software
15  *    must display the following acknowledgement:
16  *	This product includes software developed by Emmanuel Dreyfus
17  * 4. The name of the author may not be used to endorse or promote
18  *    products derived from this software without specific prior written
19  *    permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 #ifndef _AMD64_LINUX32_MISSING_H
34 #define _AMD64_LINUX32_MISSING_H
35 
36 #include <compat/netbsd32/netbsd32.h>
37 #include <compat/linux/common/linux_types.h>
38 
39 /*
40  * system calls not defined for COMPAT_LINUX/amd64
41  * but needed for COMPAT_LINUX32
42  */
43 struct linux_sys_old_mmap_args {
44 	syscallarg(struct linux_oldmmap *) lmp;
45 };
46 
47 struct linux_sys_fcntl64_args {
48 	syscallarg(int) fd;
49 	syscallarg(int) cmd;
50 	syscallarg(void *) arg;
51 };
52 struct linux_sys_llseek_args {
53         syscallarg(int) fd;
54         syscallarg(u_int32_t) ohigh;
55         syscallarg(u_int32_t) olow;
56         syscallarg(void *) res;
57         syscallarg(int) whence;
58 };
59 
60 struct linux_sys_getgroups16_args {
61         syscallarg(int) gidsetsize;
62         syscallarg(linux_gid16_t *) gidset;
63 };
64 
65 struct linux_sys_setgroups16_args {
66         syscallarg(int) gidsetsize;
67         syscallarg(linux_gid16_t *) gidset;
68 };
69 
70 #ifdef _KERNEL
71 __BEGIN_DECLS
72 #define SYS_DEF(foo) struct foo##_args; \
73 	int foo(lwp_t *, const struct foo##_args *, register_t *)
74 SYS_DEF(linux_sys_old_mmap);
75 SYS_DEF(linux_sys_fcntl64);
76 SYS_DEF(linux_sys_llseek);
77 SYS_DEF(linux_sys_getgroups16);
78 SYS_DEF(linux_sys_setgroups16);
79 #undef SYS_DEF
80 __END_DECLS
81 #endif /* !_KERNEL */
82 
83 #endif /* _AMD64_LINUX32_MISSING_H */
84