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