NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/39494: Common global symbol defined twice: smbfs_node_pool
>Number: 39494
>Category: kern
>Synopsis: Common global symbol defined twice: smbfs_node_pool
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 06 17:55:00 +0000 2008
>Originator: Juan RP
>Release: Latest
>Organization:
>Environment:
NetBSD vmware-netbsd 4.99.72 NetBSD 4.99.72 (MASTER) #13: Sat Sep 6 19:20:40
CEST 2008 juan@vmware-netbsd:/home/juan/build/obj/sys/arch/i386/compile/MASTER
i386
>Description:
When linking the kernel with --warn-common, a warning of a common global symbol
of the same size was found for 'smbfs_node_pool'.
smbfs_node_pool is declared as global in sys/fs/smbfs_vfsops.c.
smbfs_node_pool is declared as global in sys/fs/smbfs_node.c.
Therefore only a definition is needed... I declared it as extern in smbfs.h and
declare it in only one place.
>How-To-Repeat:
Code inspection.
>Fix:
Index: smbfs.h
===================================================================
RCS file: /cvsroot/src/sys/fs/smbfs/smbfs.h,v
retrieving revision 1.16
diff -b -u -p -r1.16 smbfs.h
--- smbfs.h 26 Jan 2008 14:25:38 -0000 1.16
+++ smbfs.h 6 Sep 2008 17:03:57 -0000
@@ -70,6 +70,7 @@ struct smb_share;
struct u_cred;
struct vop_ioctl_args;
struct buf;
+struct pool;
struct smbmount {
struct smbfs_args sm_args;
@@ -95,6 +96,9 @@ struct smbmount {
int smbfs_doio(struct buf *, kauth_cred_t, struct lwp *);
int smbfs_vinvalbuf(struct vnode *, int, kauth_cred_t, struct lwp *, int);
int smbfs_kqfilter(void *);
+
+extern struct pool smbfs_node_pool;
+
#endif /* KERNEL */
#endif /* _FS_SMBFS_SMBFS_H_ */
Index: smbfs_node.c
===================================================================
RCS file: /cvsroot/src/sys/fs/smbfs/smbfs_node.c,v
retrieving revision 1.39
diff -b -u -p -r1.39 smbfs_node.c
--- smbfs_node.c 24 Jun 2008 17:04:11 -0000 1.39
+++ smbfs_node.c 6 Sep 2008 17:03:57 -0000
@@ -73,8 +73,6 @@ static const struct genfs_ops smbfs_genf
.gop_write = genfs_compat_gop_write,
};
-struct pool smbfs_node_pool;
-
static inline char *
smbfs_name_alloc(const u_char *name, int nmlen)
{
Home |
Main Index |
Thread Index |
Old Index