From 6d029d549a43ba52efb5cc8316185c71214f6de0 Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 26 Feb 2009 21:08:48 +0000 Subject: [PATCH] fix kernel build with no options NTP --- sys/compat/netbsd32/netbsd32_time.c | 27 ++------------------------- sys/compat/netbsd32/syscalls.master | 11 ++++++++++- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/sys/compat/netbsd32/netbsd32_time.c b/sys/compat/netbsd32/netbsd32_time.c index 0997cbaf2807..7702dfe40f80 100644 --- a/sys/compat/netbsd32/netbsd32_time.c +++ b/sys/compat/netbsd32/netbsd32_time.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_time.c,v 1.35 2009/01/11 02:45:49 christos Exp $ */ +/* $NetBSD: netbsd32_time.c,v 1.36 2009/02/26 21:08:48 christos Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.35 2009/01/11 02:45:49 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.36 2009/02/26 21:08:48 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -177,29 +177,6 @@ netbsd32_ntp_adjtime(struct lwp *l, const struct netbsd32_ntp_adjtime_args *uap, } return error; } -#else /* !NTP */ -int -netbsd32___ntp_gettime50(struct lwp *l, const struct netbsd32___ntp_gettime50_args *uap, register_t *retval) -{ - - return (ENOSYS); -} - -#ifdef COMPAT_30 -int -compat_30_netbsd32_ntp_gettime(struct lwp *l, const struct compat_30_netbsd32_ntp_gettime_args *uap, register_t *retval) -{ - - return (ENOSYS); -} -#endif - -int -netbsd32_ntp_adjtime(struct lwp *l, const struct netbsd32_ntp_adjtime_args *uap, register_t *retval) -{ - - return (ENOSYS); -} #endif /* NTP */ int diff --git a/sys/compat/netbsd32/syscalls.master b/sys/compat/netbsd32/syscalls.master index d93aca20d1fe..7d5422db9cd3 100644 --- a/sys/compat/netbsd32/syscalls.master +++ b/sys/compat/netbsd32/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.77 2009/01/13 22:27:43 pooka Exp $ + $NetBSD: syscalls.master,v 1.78 2009/02/26 21:08:48 christos Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -367,9 +367,14 @@ 174 STD { netbsd32_ssize_t|netbsd32||pwrite(int fd, \ netbsd32_voidp buf, netbsd32_size_t nbyte, \ int pad, off_t offset); } +#if defined(NTP) || !defined(_KERNEL_OPT) 175 COMPAT_30 { int|netbsd32||ntp_gettime( \ netbsd32_ntptimeval50p_t ntvp); } 176 STD { int|netbsd32||ntp_adjtime(netbsd32_timexp_t tp); } +#else +175 EXCL ntp_gettime +176 EXCL ntp_adjtime +#endif 177 UNIMPL 178 UNIMPL 179 UNIMPL @@ -828,8 +833,12 @@ 392 COMPAT_30 { int|netbsd32|30|fhstat( \ netbsd32_fhandlep_t fhp, \ netbsd32_stat50p_t sb); } +#if defined(NTP) || !defined(_KERNEL_OPT) 393 COMPAT_50 { int|netbsd32||ntp_gettime( \ netbsd32_ntptimeval50p_t ntvp); } +#else +393 EXCL __ntp_gettime30 +#endif 394 STD { int|netbsd32|30|socket(int domain, int type, \ int protocol); } 395 STD { int|netbsd32|30|getfh(netbsd32_charp fname, \