Module Name:    src
Committed By:   kre
Date:           Sun Jun  2 19:41:51 UTC 2019

Modified Files:
        src/sys/rump/librump/rumpkern: emul.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.190 src/sys/rump/librump/rumpkern/emul.c:1.191
--- src/sys/rump/librump/rumpkern/emul.c:1.190	Sat Mar  9 09:02:38 2019
+++ src/sys/rump/librump/rumpkern/emul.c	Sun Jun  2 19:41:51 2019
@@ -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_
 __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 *);

Reply via email to