Apply a patch from hannken@ which adds a weak alias for rump_getcwd_common()

allowing -lrump to be used without -lrumpvfs.

This is an alternate fix to the earluer one which added -lrumvfs to
many rump based tests (and the rump server) which might be undone soon.

This also fixes the sun2 build.
This commit is contained in:
kre 2019-06-02 19:41:51 +00:00
parent 0dc76c690a
commit 67d3f6259c

View File

@ -1,4 +1,4 @@
/* $NetBSD: emul.c,v 1.190 2019/03/09 09:02:38 hannken Exp $ */
/* $NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.190 2019/03/09 09:02:38 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $");
#include <sys/param.h>
#include <sys/cprng.h>
@ -256,6 +256,19 @@ void (*delay_func)(unsigned int) = rump_delay;
__strong_alias(delay,rump_delay);
__strong_alias(_delay,rump_delay);
/* Weak alias for getcwd_common to be used unless librumpvfs is present. */
int rump_getcwd_common(struct vnode *, struct vnode *, char **, char *,
int, int, struct lwp *);
int
rump_getcwd_common(struct vnode *lvp, struct vnode *rvp, char **bpp, char *bufp,
int limit, int flags, struct lwp *l)
{
return ENOENT;
}
__weak_alias(getcwd_common,rump_getcwd_common);
/* Weak aliases for fstrans to be used unless librumpvfs is present. */
void rump_fstrans_start(struct mount *);