diff --git a/lib/libc/compat/sys/Makefile.inc b/lib/libc/compat/sys/Makefile.inc index 75d1c3c25cde..1803614c6b7e 100644 --- a/lib/libc/compat/sys/Makefile.inc +++ b/lib/libc/compat/sys/Makefile.inc @@ -1,11 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.6 2006/07/31 16:34:42 martin Exp $ +# $NetBSD: Makefile.inc,v 1.7 2007/07/14 15:53:04 dsl Exp $ .PATH: ${COMPATDIR}/sys SRCS+= compat_getdents.c compat_getdirentries.c compat_msync.c \ compat_ntp_gettime.c \ compat_semctl.c compat_sigaltstack.c compat_stat.c compat___stat13.c \ compat_statfs.c compat_socket.c compat_getfh.c \ - compat_fhopen.c compat___fhstat30.c compat_fhstatvfs.c compat_fhstatvfs1.c + compat_fhopen.c compat___fhstat30.c compat_fhstatvfs.c compat_fhstatvfs1.c \ + compat_mount.c MAN+= getdirentries.3 .if ${MKLINT} != "no" diff --git a/lib/libc/compat/sys/compat_mount.c b/lib/libc/compat/sys/compat_mount.c new file mode 100644 index 000000000000..658665c8fa84 --- /dev/null +++ b/lib/libc/compat/sys/compat_mount.c @@ -0,0 +1,28 @@ +/* $NetBSD: compat_mount.c,v 1.1 2007/07/14 15:53:04 dsl Exp $ */ + + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: compat_mount.c,v 1.1 2007/07/14 15:53:04 dsl Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#define __LIBC12_SOURCE__ + +#include +#include + +__warn_references(mount, + "warning: reference to compatibility mount(); include to generate correct reference") + +int mount(const char *, const char *, int, void *); +int __mount50(const char *, const char *, int, void *, size_t); + +/* + * Convert old mount() call to new calling convention + * The kernel will treat length 0 as 'default for the fs'. + */ +int +mount(const char *type, const char *dir, int flags, void *data) +{ + return __mount50(type, dir, flags, data, 0); +} diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index d70168d1a8c0..2a5daf5adb0e 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.174 2007/06/03 17:35:24 christos Exp $ +# $NetBSD: Makefile.inc,v 1.175 2007/07/14 15:53:04 dsl Exp $ # @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 # sys sources @@ -74,8 +74,8 @@ ASM= access.S acct.S \ _lwp_suspend.S _lwp_continue.S _lwp_wakeup.S _lwp_detach.S \ _lwp_getprivate.S _lwp_setprivate.S \ madvise.S mincore.S minherit.S mkdir.S mkfifo.S mknod.S \ - mlock.S mlockall.S mount.S mprotect.S __msgctl13.S msgget.S \ - munlock.S munlockall.S munmap.S \ + mlock.S mlockall.S __mount50.S mprotect.S __msgctl13.S \ + msgget.S munlock.S munlockall.S munmap.S \ nfssvc.S __ntp_gettime30.S \ pathconf.S pmc_get_info.S pmc_control.S __posix_chown.S \ posix_fadvise.S \