- Use #ifdef AIO, instead of #ifdef notyet. Not a solution, but at

least gets it working for MONOLITHIC kernel.
- Similarily add #ifdef MQUEUE for mqueue compat.
- Amend TNF license to be 2-clause.  Approved by <christos>.
This commit is contained in:
rmind 2009-07-19 02:41:27 +00:00
parent 6227d22ed0
commit 029f6c41a7
2 changed files with 18 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat_mod.c,v 1.7 2009/01/13 20:47:47 martin Exp $ */
/* $NetBSD: compat_mod.c,v 1.8 2009/07/19 02:41:27 rmind Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.7 2009/01/13 20:47:47 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.8 2009/07/19 02:41:27 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -231,6 +231,8 @@ static const struct syscall_package compat_syscalls[] = {
# endif
{ SYS_compat_50___fhstat40, 0, (sy_call_t *)compat_50_sys___fhstat40 },
{ SYS_compat_50_aio_suspend, 0, (sy_call_t *)compat_50_sys_aio_suspend },
{ SYS_compat_50_mq_timedreceive, 0, (sy_call_t *)compat_50_sys_mq_timedreceive },
{ SYS_compat_50_mq_timedsend, 0, (sy_call_t *)compat_50_sys_mq_timedsend },
#endif
{ 0, 0, NULL },
};

View File

@ -1,7 +1,7 @@
/* $NetBSD: kern_time_50.c,v 1.7 2009/03/29 19:21:19 christos Exp $ */
/* $NetBSD: kern_time_50.c,v 1.8 2009/07/19 02:41:27 rmind Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@ -15,13 +15,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@ -36,10 +29,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.7 2009/03/29 19:21:19 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.8 2009/07/19 02:41:27 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_aio.h"
#include "opt_ntp.h"
#include "opt_mqueue.h"
#endif
#include <sys/param.h>
@ -373,7 +368,7 @@ compat_50_sys_aio_suspend(struct lwp *l,
syscallarg(int) nent;
syscallarg(const struct timespec50 *) timeout;
} */
#ifdef notyet
#ifdef AIO
struct aiocb **list;
struct timespec ts;
struct timespec50 ts50;
@ -542,6 +537,7 @@ compat_50_sys_mq_timedsend(struct lwp *l,
syscallarg(unsigned) msg_prio;
syscallarg(const struct timespec50 *) abs_timeout;
} */
#ifdef MQUEUE
int t;
int error;
struct timespec50 ts50;
@ -561,6 +557,9 @@ compat_50_sys_mq_timedsend(struct lwp *l,
return mq_send1(l, SCARG(uap, mqdes), SCARG(uap, msg_ptr),
SCARG(uap, msg_len), SCARG(uap, msg_prio), t);
#else
return ENOSYS;
#endif
}
int
@ -574,6 +573,7 @@ compat_50_sys_mq_timedreceive(struct lwp *l,
syscallarg(unsigned *) msg_prio;
syscallarg(const struct timespec50 *) abs_timeout;
} */
#ifdef MQUEUE
int error, t;
ssize_t mlen;
struct timespec ts;
@ -598,6 +598,9 @@ compat_50_sys_mq_timedreceive(struct lwp *l,
*retval = mlen;
return error;
#else
return ENOSYS;
#endif
}
static int