Subject: port-mac68k/2860: Undefined symbol _nfsbootdevname
To: None <gnats-bugs@gnats.netbsd.org>
From: None <paul@pgoyette.bdt.com>
List: netbsd-bugs
Date: 10/18/1996 00:11:26
>Number: 2860
>Category: port-mac68k
>Synopsis: Undefined symbol _nfsbootdevname
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 18 00:20:06 1996
>Last-Modified:
>Originator: Paul Goyette
>Organization:
>Release: 1.2A
>Environment:
System: NetBSD pgoyette.bdt.com 1.2 NetBSD 1.2 (PGOYETTE) #92: Sun Sep 22 17:26:40 PDT 1996 paul@pgoyette.bdt.com:/home/paul/src/sys/arch/mac68k/compile/PGOYETTE mac68k
>Description:
Symbol _nfsbootdevname is defined in src/sys/nfs/nfs_boot.c only if NETHER
is non-zero. But src/sys/arch/mac68k/mac68k/autoconf.c references the
symbol if NFSCLIENT is defined, regardless of NETHER. This results in an
undefined symbol in the linker if the kernel was built with NFSCLIENT but
without any Ethernet interface.
>How-To-Repeat:
See above.
>Fix:
The following patch modifies autoconf.c to not reference the symbol unless
an Ethernet interface was configured. This is probably not the best
solution, but at least it let's you build the kernel. :)
A more correct solution would probably be to define the symbol whenever
NFSCLIENT is selected, regardless of whether an Ethernet interface is
configured.
*** /usr/src/sys/arch/mac68k/mac68k/autoconf.c Mon Oct 14 09:11:21 1996
--- ./autoconf.c Thu Oct 17 23:44:15 1996
***************
*** 244,250 ****
--- 244,252 ----
struct device *bootdv, *rootdv, *swapdv;
int bootpartition;
#if defined(NFSCLIENT)
+ #if NETHER
extern char *nfsbootdevname;
+ #endif
extern int nfs_mountroot __P((void *));
#endif
#if defined(FFS)
***************
*** 383,389 ****
--- 385,393 ----
#if defined(NFSCLIENT)
case DV_IFNET:
mountroot = nfs_mountroot;
+ #if NETHER
nfsbootdevname = rootdv->dv_xname;
+ #endif
return;
#endif
#if defined(FFS)
>Audit-Trail:
>Unformatted: